Example #1
0
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);

            // Act
            criteria.MatchesVisitor((string)null);
        }
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);

            // Act
            Assert.Throws <ArgumentNullException>(() => criteria.MatchesVisitor(null));
        }
Example #3
0
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithInvalidDefinition_ThrowsException()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria   = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);
            var definition = "invalid";

            // Act
            criteria.MatchesVisitor(definition);
        }
Example #4
0
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionIsUnauthenticated_WithUnauthenticatedMember_ReturnsTrue()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria   = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);
            var definition = string.Format(DefinitionFormat, "false");

            // Act
            var result = criteria.MatchesVisitor(definition);

            // Assert
            Assert.IsTrue(result);
        }
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionIsUnauthenticated_WithUnauthenticatedMember_ReturnsTrue()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);
            var definition = string.Format(DefinitionFormat, "false");

            // Act
            var result = criteria.MatchesVisitor(definition);

            // Assert
            Assert.IsTrue(result);
        }
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithInvalidDefinition_ThrowsException()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);
            var definition = "invalid";

            // Act
            criteria.MatchesVisitor(definition);
        }
        public void AuthenticationStatusPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException()
        {
            // Arrange
            var mockAuthenticationStatusProvider = MockAuthenticationStatusProvider();
            var criteria = new AuthenticationStatusPersonalisationGroupCriteria(mockAuthenticationStatusProvider.Object);

            // Act
            criteria.MatchesVisitor((string)null);
        }