File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
algorithm_exercises_csharp_test
algorithm_exercises_csharp Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,9 @@ namespace algorithm_exercises_csharp;
44
55public class HelloWorld
66{
7- const string __message = "Hello World!" ;
7+ private readonly string __message = "Hello World!" ;
88
9- [ ExcludeFromCodeCoverage ]
10- protected HelloWorld ( ) { }
11-
12- public static string hello ( )
9+ public string hello ( )
1310 {
1411 return __message ;
1512 }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public class HelloWorldBruteForceTest
99 public void testInitialize ( )
1010 {
1111 var envValue = Environment . GetEnvironmentVariable ( "BRUTEFORCE" ) ;
12- envValue = envValue ? . ToUpper ( ) ;
12+ envValue = envValue ? . ToUpperInvariant ( ) ;
1313 if ( ! allowedValues . Contains ( envValue , StringComparer . OrdinalIgnoreCase ) )
1414 {
1515 Assert . Inconclusive ( $ "Skipping BRUTEFORCE test because environment variable 'BRUTEFORCE' is not one of the expected values.") ;
@@ -20,7 +20,7 @@ public void testInitialize()
2020 public void testHelloBruteForce ( )
2121 {
2222 string expected = "Hello World!" ;
23- string result = HelloWorld . hello ( ) ;
23+ string result = HelloWorld . create ( ) . hello ( ) ;
2424
2525 Assert . AreEqual ( expected , result ) ;
2626 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public void testInstance()
3434 public void testHello ( )
3535 {
3636 string expected = "Hello World!" ;
37- string result = HelloWorld . hello ( ) ;
37+ string result = new HelloWorld ( ) . hello ( ) ;
3838
3939 Assert . AreEqual ( expected , result ) ;
4040 }
You can’t perform that action at this time.
0 commit comments