public void Test_StrictCasing() { RegexSpecification s = new RegexSpecification("Foo", false, false); Assert.IsFalse(s.Test("").Success); Assert.IsFalse(s.Test("a").Success); Assert.IsFalse(s.Test(null).Success); Assert.IsFalse(s.Test("foo").Success); Assert.IsTrue(s.Test("Foo").Success); }
public void Test_NullMatches() { RegexSpecification s = new RegexSpecification("Foo", false, true); Assert.IsFalse(s.Test("a").Success); Assert.IsFalse(s.Test("foo").Success); Assert.IsTrue(s.Test("Foo").Success); Assert.IsTrue(s.Test(null).Success); //TODO: it would seem that this test ought to succeed - consider changing this behaviour Assert.IsFalse(s.Test("").Success); }
public void Test_InvalidType() { RegexSpecification s = new RegexSpecification("Foo", false, false); Assert.IsFalse(s.Test(1).Success); }