BadScript 2
Loading...
Searching...
No Matches
Issue70Tests.cs
Go to the documentation of this file.
1using System.Linq;
4using FluentAssertions;
5using Xunit;
6using Xunit.Abstractions;
7
8//Issue #70
9//When the factory overload is used for ParseArguments, there should be no constraint not having an empty constructor.
10
12{
13 public class Issue70Tests
14 {
15 [Fact]
17 {
18 bool actual = false;
19
20 var arguments = new[] { "--amend" };
22 result.WithParsed(options => {
23 actual = options.Amend;
24 });
25
26 actual.Should().BeTrue();
27 }
28 }
29}
Provides methods to parse command line arguments.
Definition Parser.cs:21
ParserResult< object > ParseArguments(IEnumerable< string > args, params Type[] types)
Parses a string array of command line arguments for verb commands scenario, constructing the proper i...
Definition Parser.cs:216
static Parser Default
Gets the singleton instance created with basic defaults.
Definition Parser.cs:75