File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
algorithm-exercises-csharp-test/src Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace algorithm_exercises_csharp ;
2
+
3
+ [ TestClass ]
4
+ public class HelloWorldBruteForceTest
5
+ {
6
+ private static readonly string [ ] allowedValues = [ "TRUE" , "YES" , "1" ] ;
7
+
8
+ [ TestInitialize ]
9
+ public void testInitialize ( )
10
+ {
11
+ var envValue = Environment . GetEnvironmentVariable ( "BRUTEFORCE" ) ;
12
+ envValue = envValue ? . ToUpper ( ) ;
13
+ if ( ! allowedValues . Contains ( envValue , StringComparer . OrdinalIgnoreCase ) )
14
+ {
15
+ Assert . Inconclusive ( $ "Skipping BRUTEFORCE test because environment variable 'BRUTEFORCE' is not one of the expected values.") ;
16
+ }
17
+ }
18
+
19
+ [ TestMethod ]
20
+ public void testHelloBruteForce ( )
21
+ {
22
+ string expected = "Hello World!" ;
23
+ string result = HelloWorld . hello ( ) ;
24
+
25
+ Assert . AreEqual ( expected , result ) ;
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments