public void ShouldNotDoAnythingIfRegexIsValid() { const string candidate = @"\*\."; var pattern = Regexifier.Regexify(candidate).Pattern; Assert.That(pattern, Is.EqualTo(candidate)); }
public void ShouldAppendTrailingWildard() { var pattern = Regexifier.Regexify("abc").WithTrailingWildcard().Pattern; Assert.That(pattern, Is.EqualTo(@"abc\.*")); }
public void ShouldAddStartAndEnd() { var pattern = Regexifier.Regexify("abc").WithStartAndEnd().Pattern; Assert.That(pattern, Is.EqualTo("^abc$")); }