Example #1
0
        public void Should_MatchIgnoreCase_IfNotRegex(string pattern, string input, bool expected)
        {
            var p = new MaybeRegex(pattern);

            // Act
            var match = p.IsMatch(input);

            // Assert
            match.Should().BeTrue();
        }
Example #2
0
        public void Should_BeRegex_IfIsRegex(string str)
        {
            // Arrange
            var pattern = new MaybeRegex(str);

            // Act

            // Assert
            pattern.IsRegex.Should().BeTrue();
        }
Example #3
0
        public void Should_MatchWithRegex_IfIsRegex(string pattern, string input, bool expected)
        {
            // Arrange
            var p = new MaybeRegex(pattern);

            // Act
            var match = p.IsMatch(input);

            // Assert
            match.Should().Be(expected);
        }
Example #4
0
        public void Should_BeString_IfNotRegex(string str)
        {
            // Arrange
            var pattern = new MaybeRegex(str);

            // Act


            // Assert
            pattern.IsRegex.Should().BeFalse();
        }