We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 958fe34 commit a691db1Copy full SHA for a691db1
exercises/practice/word-count/.meta/Generator.tpl
@@ -0,0 +1,20 @@
1
+using System.Collections.Generic;
2
+using Xunit;
3
+
4
+public class WordCountTests
5
+{
6
+ {{for testCase in testCases}}
7
+ [Fact{{if !for.first}}(Skip = "Remove this Skip property to run this test"){{end}}]
8
+ public void {{testCase.testMethodName}}()
9
+ {
10
+ var actual = WordCount.CountWords({{testCase.input.sentence | string.literal}});
11
+ var expected = new Dictionary<string, int>
12
13
+ {{for key in testCase.expected | object.keys}}
14
+ [{{key | string.literal}}] = {{testCase.expected[key]}}{{if !for.last}},{{end}}
15
+ {{end}}
16
+ };
17
+ Assert.Equal(expected, actual);
18
+ }
19
20
+}
generators.deprecated/Exercises/Generators/WordCount.cs
0 commit comments