BadScript 2
Loading...
Searching...
No Matches
Issue591Tests.cs
Go to the documentation of this file.
1using System.Linq;
4using FluentAssertions;
5using Xunit;
6using Xunit.Abstractions;
7
8//Issue #591
9//When options class is only having explicit interface declarations, it should be detected as mutable.
10
12{
13 public class Issue591Tests
14 {
15 [Fact]
17 {
18 string actual = string.Empty;
19
20 var arguments = new[] { "--inputfile", "file2.txt" };
22 result.WithParsed(options => {
23 actual = ((IInterface_With_Two_Scalar_Options)options).InputFile;
24 });
25
26 actual.Should().Be("file2.txt");
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