33using System . CommandLine . Parsing ;
44using System . Globalization ;
55using System . Threading . Tasks ;
6-
6+ using FluentAssertions ;
77using Xunit ;
88
99namespace System . CommandLine . Tests
@@ -21,7 +21,7 @@ public static async Task Sets_CurrentCulture_to_directive_culture()
2121 Handler = CommandHandler . Create ( ( ) =>
2222 {
2323 asserted = true ;
24- Assert . Equal ( "de-DE" , CultureInfo . CurrentCulture . Name ) ;
24+ CultureInfo . CurrentCulture . Name . Should ( ) . Be ( "de-DE" ) ;
2525 } )
2626 } ;
2727 var parser = new CommandLineBuilder ( rootCommand )
@@ -30,7 +30,7 @@ public static async Task Sets_CurrentCulture_to_directive_culture()
3030
3131 await parser . InvokeAsync ( new [ ] { "[culture:de-DE]" } ) ;
3232
33- Assert . True ( asserted ) ;
33+ asserted . Should ( ) . BeTrue ( ) ;
3434 }
3535
3636 [ Fact ]
@@ -44,7 +44,7 @@ public static async Task Sets_CurrentCulture_to_last_directive_culture()
4444 Handler = CommandHandler . Create ( ( ) =>
4545 {
4646 asserted = true ;
47- Assert . Equal ( "nb-NO" , CultureInfo . CurrentCulture . Name ) ;
47+ CultureInfo . CurrentCulture . Name . Should ( ) . Be ( "nb-NO" ) ;
4848 } )
4949 } ;
5050 var parser = new CommandLineBuilder ( rootCommand )
@@ -53,7 +53,7 @@ public static async Task Sets_CurrentCulture_to_last_directive_culture()
5353
5454 await parser . InvokeAsync ( new [ ] { "[culture:de-DE]" , "[culture:nb-NO]" } ) ;
5555
56- Assert . True ( asserted ) ;
56+ asserted . Should ( ) . BeTrue ( ) ;
5757 }
5858
5959 [ Fact ]
@@ -67,7 +67,7 @@ public static async Task Sets_CurrentUICulture_to_directive_culture()
6767 Handler = CommandHandler . Create ( ( ) =>
6868 {
6969 asserted = true ;
70- Assert . Equal ( "de-DE" , CultureInfo . CurrentUICulture . Name ) ;
70+ CultureInfo . CurrentUICulture . Name . Should ( ) . Be ( "de-DE" ) ;
7171 } )
7272 } ;
7373 var parser = new CommandLineBuilder ( rootCommand )
@@ -76,7 +76,7 @@ public static async Task Sets_CurrentUICulture_to_directive_culture()
7676
7777 await parser . InvokeAsync ( new [ ] { "[uiculture:de-DE]" } ) ;
7878
79- Assert . True ( asserted ) ;
79+ asserted . Should ( ) . BeTrue ( ) ;
8080 }
8181
8282 [ Fact ]
@@ -90,7 +90,7 @@ public static async Task Sets_CurrentUICulture_to_last_directive_culture()
9090 Handler = CommandHandler . Create ( ( ) =>
9191 {
9292 asserted = true ;
93- Assert . Equal ( "nb-NO" , CultureInfo . CurrentUICulture . Name ) ;
93+ CultureInfo . CurrentUICulture . Name . Should ( ) . Be ( "nb-NO" ) ;
9494 } )
9595 } ;
9696 var parser = new CommandLineBuilder ( rootCommand )
@@ -99,7 +99,7 @@ public static async Task Sets_CurrentUICulture_to_last_directive_culture()
9999
100100 await parser . InvokeAsync ( new [ ] { "[uiculture:de-DE]" , "[uiculture:nb-NO]" } ) ;
101101
102- Assert . True ( asserted ) ;
102+ asserted . Should ( ) . BeTrue ( ) ;
103103 }
104104
105105 [ Fact ]
@@ -113,7 +113,7 @@ public static async Task Sets_CurrentCulture_to_invariant_culture()
113113 Handler = CommandHandler . Create ( ( ) =>
114114 {
115115 asserted = true ;
116- Assert . Equal ( CultureInfo . InvariantCulture , CultureInfo . CurrentCulture ) ;
116+ CultureInfo . CurrentCulture . Should ( ) . Be ( CultureInfo . InvariantCulture ) ;
117117 } )
118118 } ;
119119
@@ -123,7 +123,7 @@ public static async Task Sets_CurrentCulture_to_invariant_culture()
123123
124124 await parser . InvokeAsync ( new [ ] { "[invariantculture]" } ) ;
125125
126- Assert . True ( asserted ) ;
126+ asserted . Should ( ) . BeTrue ( ) ;
127127 }
128128
129129 [ Fact ]
@@ -137,7 +137,7 @@ public static async Task Sets_CurrentUICulture_to_invariant_culture()
137137 Handler = CommandHandler . Create ( ( ) =>
138138 {
139139 asserted = true ;
140- Assert . Equal ( CultureInfo . InvariantCulture , CultureInfo . CurrentUICulture ) ;
140+ CultureInfo . CurrentUICulture . Should ( ) . Be ( CultureInfo . InvariantCulture ) ;
141141 } )
142142 } ;
143143
@@ -147,7 +147,7 @@ public static async Task Sets_CurrentUICulture_to_invariant_culture()
147147
148148 await parser . InvokeAsync ( new [ ] { "[invariantuiculture]" } ) ;
149149
150- Assert . True ( asserted ) ;
150+ asserted . Should ( ) . BeTrue ( ) ;
151151 }
152152 }
153153}
0 commit comments