Beispiel #1
0
        public void ShouldNotDoAnythingIfRegexIsValid()
        {
            const string candidate = @"\*\.";
            var          pattern   = Regexifier.Regexify(candidate).Pattern;

            Assert.That(pattern, Is.EqualTo(candidate));
        }
Beispiel #2
0
        public void ShouldAppendTrailingWildard()
        {
            var pattern = Regexifier.Regexify("abc").WithTrailingWildcard().Pattern;

            Assert.That(pattern, Is.EqualTo(@"abc\.*"));
        }
Beispiel #3
0
        public void ShouldAddStartAndEnd()
        {
            var pattern = Regexifier.Regexify("abc").WithStartAndEnd().Pattern;

            Assert.That(pattern, Is.EqualTo("^abc$"));
        }