コード例 #1
0
        public void CaseInsensitivelyMatchesRegEx()
        {
            var args = new CaseInsensitiveRegExStringArguments();

            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().BeTrue();
            CommandLineParser.Parse(new[] { "/value=HALLOoOo" }, args).Should().BeTrue();
        }
コード例 #2
0
ファイル: ValidationTests.cs プロジェクト: xiaoxiongnpu/NClap
        public void CaseInsensitivelyMatchesRegEx()
        {
            var args = new CaseInsensitiveRegExStringArguments();

            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().BeTrue();
            TryParse(new[] { "/value=HALLOoOo" }, args).Should().BeTrue();
        }
コード例 #3
0
ファイル: ValidationTests.cs プロジェクト: reubeno/NClap
 public void CaseInsensitivelyMatchesRegEx()
 {
     var args = new CaseInsensitiveRegExStringArguments();
     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().BeTrue();
     CommandLineParser.Parse(new[] { "/value=HALLOoOo" }, args).Should().BeTrue();
 }