@@ -42,12 +42,11 @@ private static class TemplateData
4242 internal static Dictionary < string , object > ForCanonicalData ( CanonicalData canonicalData )
4343 {
4444 var testCases = canonicalData . TestCases . Select ( Create ) . ToArray ( ) ;
45-
46- return new Dictionary < string , object >
45+
46+ return new ( )
4747 {
48- { "exercise" , Create ( canonicalData . Exercise ) } ,
49- { "test_cases" , testCases . ToArray ( ) } ,
50- { "test_cases_by_property" , GroupTestCasesByProperty ( testCases ) }
48+ { "test_cases" , testCases . ToArray ( ) } ,
49+ { "test_cases_by_property" , GroupTestCasesByProperty ( testCases ) }
5150 } ;
5251 }
5352
@@ -60,15 +59,6 @@ private static ExpandoObject Create(JToken testCase)
6059 return testData ;
6160 }
6261
63- private static Dictionary < string , object > Create ( Exercise exercise ) =>
64- new ( )
65- {
66- [ "slug" ] = exercise . Slug ,
67- [ "name" ] = exercise . Name ,
68- [ "test_class_name" ] = Naming . ToTestClassName ( exercise ) ,
69- [ "tested_class_name" ] = Naming . ToTestedClassName ( exercise )
70- } ;
71-
7262 private static Dictionary < string , dynamic [ ] > GroupTestCasesByProperty ( IEnumerable < dynamic > testCases ) =>
7363 testCases
7464 . GroupBy ( testCase => ( string ) testCase . property )
0 commit comments