File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed
src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,26 @@ namespace algorithm_exercises_csharp_test.hackerrank.interview_preparation_kit.a
5
5
[ TestClass ]
6
6
public class NewYearChaosTest
7
7
{
8
- public class NewYearChaosTestCase
8
+ public class NewYearChaosTestCase ( string title , int [ ] input , string expected )
9
9
{
10
- public string title { get ; set ; } = default ! ;
11
- public List < int > input { get ; set ; } = default ! ;
12
- public string expected { get ; set ; } = default ! ;
10
+ private readonly string title = title ;
11
+ private readonly List < int > input = [ .. input ] ;
12
+ private readonly string expected = expected ;
13
+
14
+ public string Title
15
+ {
16
+ get { return title ; }
17
+ }
18
+
19
+ public List < int > Input
20
+ {
21
+ get { return input ; }
22
+ }
23
+
24
+ public string Expected
25
+ {
26
+ get { return expected ; }
27
+ }
13
28
}
14
29
15
30
private List < NewYearChaosTestCase > testCases { get ; set ; } = default ! ;
@@ -29,10 +44,10 @@ public void testMinimumBribesText()
29
44
30
45
foreach ( NewYearChaosTestCase test in testCases )
31
46
{
32
- result = NewYearChaos . minimumBribesText ( test . input ) ;
33
- NewYearChaos . minimumBribes ( test . input ) ;
47
+ result = NewYearChaos . minimumBribesText ( test . Input ) ;
48
+ NewYearChaos . minimumBribes ( test . Input ) ;
34
49
35
- Assert . AreEqual ( test . expected , result ) ;
50
+ Assert . AreEqual ( test . Expected , result ) ;
36
51
}
37
52
}
38
53
}
You can’t perform that action at this time.
0 commit comments