public void GetsRegexFor2014()
        {
            var regex = YearRegexRangeGenerator.GetRegex("2014");

            Regex.Match("1913", regex).Success.Should().BeFalse();
            Regex.Match("2015", regex).Success.Should().BeFalse();
            Regex.Match("1989", regex).Success.Should().BeTrue();
        }
Esempio n. 2
0
        public void CheckYearRangeRegEx(string fromYear, string toYear, bool passes)
        {
            var regex = YearRegexRangeGenerator.GetRegex(toYear);

            Regex.Match(fromYear, regex).Success.Should().Be(passes);
        }