public void MatchShouldReturnFalseIfMatchingBoolean() { //Arrange var toCompare = new List <string>(); toCompare.Add("test1"); toCompare.Add("test2"); var matcher = new ContainsAllOfSetMatcher(toCompare); //Act var result = matcher.Match(true); //Assert Assert.IsFalse(result); }
public void MatchShouldReturnFalseIfNullKey() { //Arrange var toCompare = new List <string>(); toCompare.Add("test1"); toCompare.Add("test2"); var matcher = new ContainsAllOfSetMatcher(toCompare); //Act List <string> key = null; var result = matcher.Match(key); //Assert Assert.IsFalse(result); }
public void MatchShouldReturnFalseIfEmptyWhitelist() { //Arrange var toCompare = new List <string>(); var matcher = new ContainsAllOfSetMatcher(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 ContainsAllOfSetMatcher(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 ContainsAllOfSetMatcher(toCompare); //Act var keys = new List <string>(); keys.Add("test1"); keys.Add("test2"); keys.Add("test3"); var result = matcher.Match(keys); //Assert Assert.IsTrue(result); //keys contains test1 and test2 }