@@ -21,49 +21,49 @@ public class Session2a_WordCounterTest {
21
21
@ Test
22
22
public void shouldCountNumberOfWords () {
23
23
WordCounter counter = new WordCounter ("Keep the bar green to keep the code clean." );
24
- assertEquals ( 9 , counter .numberOfWords ());
24
+ // TODO Check that 9, counter.numberOfWords().
25
25
}
26
26
27
27
@ Test
28
28
public void shouldVerifyContainmentOfWord () {
29
29
WordCounter counter = new WordCounter ("green bar green hat" );
30
- assertTrue ( counter .containsWord ("bar" ));
30
+ // TODO Check that counter.containsWord("bar").
31
31
}
32
32
33
33
@ Test
34
34
public void shouldVerifyNonContainmentOfWord () {
35
35
WordCounter counter = new WordCounter ("green hat" );
36
- assertFalse ( counter .containsWord ("red" ));
36
+ // TODO Check that counter.containsWord("red") is false.
37
37
}
38
38
39
39
@ Test
40
40
public void shouldReturnNullForUnknownWordCount () {
41
41
WordCounter counter = new WordCounter ("green bar green hat" );
42
- assertNull ( counter .countOf ("else" ));
42
+ // TODO Check that counter.countOf("else") is null.
43
43
}
44
44
45
45
@ Test
46
46
public void shouldReturnNotNullWordCountForExistingWord () {
47
47
WordCounter counter = new WordCounter ("green bar green hat" );
48
- assertNotNull ( counter .countOf ("green" ));
48
+ // TODO Check that counter.countOf("green") is not null.
49
49
}
50
50
51
51
@ Test
52
52
public void shouldCountGreenTwice () {
53
53
WordCounter counter = new WordCounter ("green bar green hat" );
54
- assertEquals ( Integer . valueOf ( 2 ) , counter .countOf ("green" ));
54
+ // TODO Check that 2 , counter.countOf("green").
55
55
}
56
56
57
57
@ Test
58
58
public void shouldFindUniqueWords () {
59
59
WordCounter counter = new WordCounter ("green bar green hat" );
60
- assertArrayEquals ( new String [] { "bar" , "green" , "hat" }, counter .uniqueWords ());
60
+ // TODO Check that new String[] { "bar", "green", "hat" }, counter.uniqueWords().
61
61
}
62
62
63
63
@ Test
64
64
public void shouldReturnRatioOfWords () {
65
65
WordCounter counter = new WordCounter ("green bar green" );
66
- assertEquals ( 0.33 , counter .ratioOf ("bar" ), 0.01 );
66
+ // TODO Check that 0.33, counter.ratioOf("bar").
67
67
// Note that floating point numbers need an accuracy delta, e.g. 0.01.
68
68
}
69
69
0 commit comments