public void MatchShouldReturnFalseIfMatchingBoolean() { //Arrange var toCompare = new List <string>(); toCompare.Add("test1"); toCompare.Add("test2"); var matcher = new ContainsAnyOfSetMatcher(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 ContainsAnyOfSetMatcher(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 ContainsAnyOfSetMatcher(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 MatchShouldReturnFalseOnNoneMatchingKey() { //Arrange var toCompare = new List <string>(); toCompare.Add("test0"); toCompare.Add("test2"); var matcher = new ContainsAnyOfSetMatcher(toCompare); //Act var keys = new List <string>(); keys.Add("test1"); keys.Add("test3"); var result = matcher.Match(keys); //Assert Assert.IsFalse(result); //keys contains none of the elements }
public void MatchShouldReturnTrueOnAnyMatchingKey() { //Arrange var toCompare = new List <string>(); toCompare.Add("test1"); toCompare.Add("test2"); var matcher = new ContainsAnyOfSetMatcher(toCompare); //Act var keys = new List <string>(); keys.Add("test1"); keys.Add("test3"); var result = matcher.Match(keys); //Assert Assert.IsTrue(result); //keys contains test1 }