|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+import org.junit.Before;
|
|
1
|
2
|
import org.junit.Ignore;
|
|
2
|
3
|
import org.junit.Test;
|
|
3
|
4
|
|
|
|
@@ -15,7 +16,12 @@ import static org.junit.Assert.assertTrue;
|
|
15
|
16
|
import static org.junit.Assert.assertEquals;
|
|
16
|
17
|
|
|
17
|
18
|
public class SchoolTest {
|
|
18
|
|
- private final School school = new School();
|
|
|
19
|
+ private School school;
|
|
|
20
|
+
|
|
|
21
|
+ @Before
|
|
|
22
|
+ public void setUp() {
|
|
|
23
|
+ school = new School();
|
|
|
24
|
+ }
|
|
19
|
25
|
|
|
20
|
26
|
@Test
|
|
21
|
27
|
public void startsWithNoStudents() {
|
|
|
@@ -120,7 +126,7 @@ public class SchoolTest {
|
|
120
|
126
|
// Such as UnsupportedOperationException when an unmodifiableMap is used
|
|
121
|
127
|
}
|
|
122
|
128
|
|
|
123
|
|
- assertThat(school.studentsByGradeAlphabetical().get(grade),
|
|
|
129
|
+ assertThat(school.studentsByGradeAlphabetical().get(grade),
|
|
124
|
130
|
not(hasItem(studentWhichShouldNotBeAdded)));
|
|
125
|
131
|
}
|
|
126
|
132
|
}
|