public void MatchesRegEx() { var args = new RegExStringArguments(); CommandLineParser.Parse(new string[] { }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=" }, args).Should().BeFalse(); CommandLineParser.Parse(new[] { "/value=hallo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=halloo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=hallooo" }, args).Should().BeTrue(); CommandLineParser.Parse(new[] { "/value=HALLO" }, args).Should().BeFalse(); }
public void MatchesRegEx() { var args = new RegExStringArguments(); TryParse(Array.Empty <string>(), args).Should().BeTrue(); TryParse(new[] { "/value=" }, args).Should().BeFalse(); TryParse(new[] { "/value=hallo" }, args).Should().BeTrue(); TryParse(new[] { "/value=halloo" }, args).Should().BeTrue(); TryParse(new[] { "/value=hallooo" }, args).Should().BeTrue(); TryParse(new[] { "/value=HALLO" }, args).Should().BeFalse(); }