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
55[ TestClass ]
66public class NewYearChaosTest
77{
8- public class NewYearChaosTestCase
8+ public class NewYearChaosTestCase ( string title , int [ ] input , string expected )
99 {
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+ }
1328 }
1429
1530 private List < NewYearChaosTestCase > testCases { get ; set ; } = default ! ;
@@ -29,10 +44,10 @@ public void testMinimumBribesText()
2944
3045 foreach ( NewYearChaosTestCase test in testCases )
3146 {
32- result = NewYearChaos . minimumBribesText ( test . input ) ;
33- NewYearChaos . minimumBribes ( test . input ) ;
47+ result = NewYearChaos . minimumBribesText ( test . Input ) ;
48+ NewYearChaos . minimumBribes ( test . Input ) ;
3449
35- Assert . AreEqual ( test . expected , result ) ;
50+ Assert . AreEqual ( test . Expected , result ) ;
3651 }
3752 }
3853}
You can’t perform that action at this time.
0 commit comments