public void MatchShouldReturnFalseIfMatchingBoolean()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new EqualToSetMatcher(toCompare);

            //Act
            var result = matcher.Match(true);

            //Assert
            Assert.IsFalse(result);
        }
        public void MatchShouldReturnFalseIfEmptyKey()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new EqualToSetMatcher(toCompare);

            //Act
            List <string> key    = new List <string>();
            var           result = matcher.Match(key);

            //Assert
            Assert.IsFalse(result);
        }
        public void MatchShouldReturnFalseIfEmptyWhitelist()
        {
            //Arrange
            var toCompare = new List <string>();
            var matcher   = new EqualToSetMatcher(toCompare);

            //Act
            var keys = new List <string>();

            keys.Add("test1");
            keys.Add("test3");

            var result = matcher.Match(keys);

            //Assert
            Assert.IsFalse(result); //Empty whitelist
        }
        public void MatchShouldReturnFalseOnNonMatchingKey()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new EqualToSetMatcher(toCompare);

            //Act
            var keys = new List <string>();

            keys.Add("test4");
            keys.Add("test3");

            var result = matcher.Match(keys);

            //Assert
            Assert.IsFalse(result); //keys contains no elements from set
        }
        public void MatchShouldReturnTrueOnMatchingKey()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new EqualToSetMatcher(toCompare);

            //Act
            var keys = new List <string>();

            keys.Add("test1");
            keys.Add("test2");

            var result = matcher.Match(keys);

            //Assert
            Assert.IsTrue(result); //keys contains test1 and test2
        }
        public void MatchShouldReturnFalseOnPartiallyMatchingKey()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new EqualToSetMatcher(toCompare);

            //Act
            var keys = new List <string>();

            keys.Add("test1");
            keys.Add("test2");
            keys.Add("test3");

            var result = matcher.Match(keys);

            //Assert
            Assert.IsFalse(result); //keys contains test1 and test2 but whitelist not contains tests 3
        }