This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +66
-2
lines changed Expand file tree Collapse file tree 5 files changed +66
-2
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using Xunit ;
3
+ using APIManagement . Template ;
4
+ using McMaster . Extensions . CommandLineUtils ;
5
+
6
+ namespace apimtemplate . test
7
+ {
8
+ public class Create
9
+ {
10
+
11
+ [ Fact ]
12
+ public void ShouldFailWithUnknownCommand ( )
13
+ {
14
+
15
+ var createCommand = new CreateCommand ( ) ;
16
+
17
+ var ex = Assert . ThrowsAny < CommandParsingException > ( ( ) => createCommand . Execute ( "test" ) ) ;
18
+ //Console.WriteLine(ex.Message);
19
+ Assert . Contains ( "Unrecognized command or argument 'test'" , ex . Message ) ;
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using Xunit ;
3
+ using APIManagement . Template ;
4
+ using McMaster . Extensions . CommandLineUtils ;
5
+
6
+
7
+ namespace apimtemplate . test
8
+ {
9
+ public class Extract
10
+ {
11
+ [ Fact ]
12
+ public void ShouldFailWithUnknownCommand ( )
13
+ {
14
+
15
+ var createCommand = new ExtractCommand ( ) ;
16
+
17
+ var ex = Assert . ThrowsAny < CommandParsingException > ( ( ) => createCommand . Execute ( "test" ) ) ;
18
+ //Console.WriteLine(ex.Message);
19
+ Assert . Contains ( "Unrecognized command or argument 'test'" , ex . Message ) ;
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+
3
+ <PropertyGroup >
4
+ <TargetFramework >netcoreapp2.1</TargetFramework >
5
+
6
+ <IsPackable >false</IsPackable >
7
+ </PropertyGroup >
8
+
9
+ <ItemGroup >
10
+ <ProjectReference Include =" ..\..\src\apimtemplate\apimtemplate.csproj" />
11
+ </ItemGroup >
12
+
13
+ <ItemGroup >
14
+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 15.9.0" />
15
+ <PackageReference Include =" moq" Version =" 4.10.1" />
16
+ <PackageReference Include =" xunit" Version =" 2.4.0" />
17
+ <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.0" />
18
+ </ItemGroup >
19
+
20
+ </Project >
Original file line number Diff line number Diff line change 5
5
6
6
namespace APIManagement . Template
7
7
{
8
- internal class CreateCommand : CommandLineApplication
8
+ public class CreateCommand : CommandLineApplication
9
9
{
10
10
public CreateCommand ( )
11
11
{
Original file line number Diff line number Diff line change 5
5
6
6
namespace APIManagement . Template
7
7
{
8
- internal class ExtractCommand : CommandLineApplication
8
+ public class ExtractCommand : CommandLineApplication
9
9
{
10
10
public ExtractCommand ( )
11
11
{
You can’t perform that action at this time.
0 commit comments