Пример #1
0
        public void NonEmptyAttribute()
        {
            var args = new NonEmptyStringArguments();

            CommandLineParser.Parse(new string[] { }, args).Should().BeTrue();
            CommandLineParser.Parse(new[] { "/value=" }, args).Should().BeFalse();
            CommandLineParser.Parse(new[] { "/value=a" }, args).Should().BeTrue();
            CommandLineParser.Parse(new[] { "/value= " }, args).Should().BeTrue();
            CommandLineParser.Parse(new[] { "/path=" }, args).Should().BeFalse();
            CommandLineParser.Parse(new[] { "/path=a" }, args).Should().BeTrue();
            CommandLineParser.Parse(new[] { "/path= " }, args).Should().BeTrue();
        }
Пример #2
0
        public void NonEmptyAttribute()
        {
            var args = new NonEmptyStringArguments();

            TryParse(Array.Empty <string>(), args).Should().BeTrue();
            TryParse(new[] { "/value=" }, args).Should().BeFalse();
            TryParse(new[] { "/value=a" }, args).Should().BeTrue();
            TryParse(new[] { "/value= " }, args).Should().BeTrue();
            TryParse(new[] { "/path=" }, args).Should().BeFalse();
            TryParse(new[] { "/path=a" }, args).Should().BeTrue();
            TryParse(new[] { "/path= " }, args).Should().BeTrue();
        }
Пример #3
0
 public void NonEmptyAttribute()
 {
     var args = new NonEmptyStringArguments();
     CommandLineParser.Parse(new string[] { }, args).Should().BeTrue();
     CommandLineParser.Parse(new[] { "/value=" }, args).Should().BeFalse();
     CommandLineParser.Parse(new[] { "/value=a" }, args).Should().BeTrue();
     CommandLineParser.Parse(new[] { "/value= " }, args).Should().BeTrue();
     CommandLineParser.Parse(new[] { "/path=" }, args).Should().BeFalse();
     CommandLineParser.Parse(new[] { "/path=a" }, args).Should().BeTrue();
     CommandLineParser.Parse(new[] { "/path= " }, args).Should().BeTrue();
 }