|
@@ -63,5 +63,149 @@ public class SafeCopierTest {
|
63
|
63
|
//Then
|
64
|
64
|
Assert.assertEquals(expected, actual);
|
65
|
65
|
}
|
|
66
|
+ @Test
|
|
67
|
+ public void safeCopyTest2() {
|
|
68
|
+ //Given BEFORE
|
|
69
|
+
|
|
70
|
+ //When
|
|
71
|
+ monkey1.start();
|
|
72
|
+ monkey2.start();
|
|
73
|
+ monkey3.start();
|
|
74
|
+ monkey4.start();
|
|
75
|
+ monkey5.start();
|
|
76
|
+
|
|
77
|
+ String expected = introduction;
|
|
78
|
+ String actual = sc.copied;
|
|
79
|
+ //Then
|
|
80
|
+ Assert.assertEquals(expected, actual);
|
|
81
|
+ }
|
|
82
|
+ @Test
|
|
83
|
+ public void safeCopyTest3() {
|
|
84
|
+ //Given BEFORE
|
|
85
|
+
|
|
86
|
+ //When
|
|
87
|
+ monkey1.start();
|
|
88
|
+ monkey2.start();
|
|
89
|
+ monkey3.start();
|
|
90
|
+ monkey4.start();
|
|
91
|
+ monkey5.start();
|
|
92
|
+
|
|
93
|
+ String expected = introduction;
|
|
94
|
+ String actual = sc.copied;
|
|
95
|
+ //Then
|
|
96
|
+ Assert.assertEquals(expected, actual);
|
|
97
|
+ }
|
|
98
|
+ @Test
|
|
99
|
+ public void safeCopyTest4() {
|
|
100
|
+ //Given BEFORE
|
|
101
|
+
|
|
102
|
+ //When
|
|
103
|
+ monkey1.start();
|
|
104
|
+ monkey2.start();
|
|
105
|
+ monkey3.start();
|
|
106
|
+ monkey4.start();
|
|
107
|
+ monkey5.start();
|
|
108
|
+
|
|
109
|
+ String expected = introduction;
|
|
110
|
+ String actual = sc.copied;
|
|
111
|
+ //Then
|
|
112
|
+ Assert.assertEquals(expected, actual);
|
|
113
|
+ }
|
|
114
|
+ @Test
|
|
115
|
+ public void safeCopyTest5() {
|
|
116
|
+ //Given BEFORE
|
|
117
|
+
|
|
118
|
+ //When
|
|
119
|
+ monkey1.start();
|
|
120
|
+ monkey2.start();
|
|
121
|
+ monkey3.start();
|
|
122
|
+ monkey4.start();
|
|
123
|
+ monkey5.start();
|
|
124
|
+
|
|
125
|
+ String expected = introduction;
|
|
126
|
+ String actual = sc.copied;
|
|
127
|
+ //Then
|
|
128
|
+ Assert.assertEquals(expected, actual);
|
|
129
|
+ }
|
|
130
|
+ @Test
|
|
131
|
+ public void safeCopyTest6() {
|
|
132
|
+ //Given BEFORE
|
|
133
|
+
|
|
134
|
+ //When
|
|
135
|
+ monkey1.start();
|
|
136
|
+ monkey2.start();
|
|
137
|
+ monkey3.start();
|
|
138
|
+ monkey4.start();
|
|
139
|
+ monkey5.start();
|
|
140
|
+
|
|
141
|
+ String expected = introduction;
|
|
142
|
+ String actual = sc.copied;
|
|
143
|
+ //Then
|
|
144
|
+ Assert.assertEquals(expected, actual);
|
|
145
|
+ }
|
|
146
|
+ @Test
|
|
147
|
+ public void safeCopyTest7() {
|
|
148
|
+ //Given BEFORE
|
|
149
|
+
|
|
150
|
+ //When
|
|
151
|
+ monkey1.start();
|
|
152
|
+ monkey2.start();
|
|
153
|
+ monkey3.start();
|
|
154
|
+ monkey4.start();
|
|
155
|
+ monkey5.start();
|
|
156
|
+
|
|
157
|
+ String expected = introduction;
|
|
158
|
+ String actual = sc.copied;
|
|
159
|
+ //Then
|
|
160
|
+ Assert.assertEquals(expected, actual);
|
|
161
|
+ }
|
|
162
|
+ @Test
|
|
163
|
+ public void safeCopyTest8() {
|
|
164
|
+ //Given BEFORE
|
|
165
|
+
|
|
166
|
+ //When
|
|
167
|
+ monkey1.start();
|
|
168
|
+ monkey2.start();
|
|
169
|
+ monkey3.start();
|
|
170
|
+ monkey4.start();
|
|
171
|
+ monkey5.start();
|
|
172
|
+
|
|
173
|
+ String expected = introduction;
|
|
174
|
+ String actual = sc.copied;
|
|
175
|
+ //Then
|
|
176
|
+ Assert.assertEquals(expected, actual);
|
|
177
|
+ }
|
|
178
|
+ @Test
|
|
179
|
+ public void safeCopyTest9() {
|
|
180
|
+ //Given BEFORE
|
|
181
|
+
|
|
182
|
+ //When
|
|
183
|
+ monkey1.start();
|
|
184
|
+ monkey2.start();
|
|
185
|
+ monkey3.start();
|
|
186
|
+ monkey4.start();
|
|
187
|
+ monkey5.start();
|
|
188
|
+
|
|
189
|
+ String expected = introduction;
|
|
190
|
+ String actual = sc.copied;
|
|
191
|
+ //Then
|
|
192
|
+ Assert.assertEquals(expected, actual);
|
|
193
|
+ }
|
|
194
|
+ @Test
|
|
195
|
+ public void safeCopyTest10() {
|
|
196
|
+ //Given BEFORE
|
|
197
|
+
|
|
198
|
+ //When
|
|
199
|
+ monkey1.start();
|
|
200
|
+ monkey2.start();
|
|
201
|
+ monkey3.start();
|
|
202
|
+ monkey4.start();
|
|
203
|
+ monkey5.start();
|
|
204
|
+
|
|
205
|
+ String expected = introduction;
|
|
206
|
+ String actual = sc.copied;
|
|
207
|
+ //Then
|
|
208
|
+ Assert.assertEquals(expected, actual);
|
|
209
|
+ }
|
66
|
210
|
|
67
|
211
|
}
|