18
18
import static com .google .common .truth .FailureAssertions .assertFailureKeys ;
19
19
import static com .google .common .truth .FailureAssertions .assertFailureValue ;
20
20
import static com .google .common .truth .IntStreamSubject .intStreams ;
21
- import static com .google .common .truth .Truth8 .assertThat ;
22
21
import static java .util .Arrays .asList ;
23
22
import static org .junit .Assert .fail ;
24
23
@@ -39,7 +38,7 @@ public final class IntStreamSubjectTest {
39
38
@ Test
40
39
public void testIsEqualTo () throws Exception {
41
40
IntStream stream = IntStream .of (42 );
42
- assertThat (stream ).isEqualTo (stream );
41
+ Truth8 . assertThat (stream ).isEqualTo (stream );
43
42
}
44
43
45
44
@ Test
@@ -53,7 +52,7 @@ public void testIsEqualToList() throws Exception {
53
52
public void testNullStream_fails () throws Exception {
54
53
IntStream nullStream = null ;
55
54
try {
56
- assertThat (nullStream ).isEmpty ();
55
+ Truth8 . assertThat (nullStream ).isEmpty ();
57
56
fail ();
58
57
} catch (NullPointerException expected ) {
59
58
}
@@ -62,18 +61,18 @@ public void testNullStream_fails() throws Exception {
62
61
@ Test
63
62
public void testNullStreamIsNull () throws Exception {
64
63
IntStream nullStream = null ;
65
- assertThat (nullStream ).isNull ();
64
+ Truth8 . assertThat (nullStream ).isNull ();
66
65
}
67
66
68
67
@ Test
69
68
public void testIsSameInstanceAs () throws Exception {
70
69
IntStream stream = IntStream .of (1 );
71
- assertThat (stream ).isSameInstanceAs (stream );
70
+ Truth8 . assertThat (stream ).isSameInstanceAs (stream );
72
71
}
73
72
74
73
@ Test
75
74
public void testIsEmpty () throws Exception {
76
- assertThat (IntStream .of ()).isEmpty ();
75
+ Truth8 . assertThat (IntStream .of ()).isEmpty ();
77
76
}
78
77
79
78
@ Test
@@ -84,7 +83,7 @@ public void testIsEmpty_fails() throws Exception {
84
83
85
84
@ Test
86
85
public void testIsNotEmpty () throws Exception {
87
- assertThat (IntStream .of (42 )).isNotEmpty ();
86
+ Truth8 . assertThat (IntStream .of (42 )).isNotEmpty ();
88
87
}
89
88
90
89
@ Test
@@ -95,7 +94,7 @@ public void testIsNotEmpty_fails() throws Exception {
95
94
96
95
@ Test
97
96
public void testHasSize () throws Exception {
98
- assertThat (IntStream .of (42 )).hasSize (1 );
97
+ Truth8 . assertThat (IntStream .of (42 )).hasSize (1 );
99
98
}
100
99
101
100
@ Test
@@ -106,7 +105,7 @@ public void testHasSize_fails() throws Exception {
106
105
107
106
@ Test
108
107
public void testContainsNoDuplicates () throws Exception {
109
- assertThat (IntStream .of (42 )).containsNoDuplicates ();
108
+ Truth8 . assertThat (IntStream .of (42 )).containsNoDuplicates ();
110
109
}
111
110
112
111
@ Test
@@ -117,7 +116,7 @@ public void testContainsNoDuplicates_fails() throws Exception {
117
116
118
117
@ Test
119
118
public void testContains () throws Exception {
120
- assertThat (IntStream .of (42 )).contains (42 );
119
+ Truth8 . assertThat (IntStream .of (42 )).contains (42 );
121
120
}
122
121
123
122
@ Test
@@ -128,7 +127,7 @@ public void testContains_fails() throws Exception {
128
127
129
128
@ Test
130
129
public void testContainsAnyOf () throws Exception {
131
- assertThat (IntStream .of (42 )).containsAnyOf (42 , 43 );
130
+ Truth8 . assertThat (IntStream .of (42 )).containsAnyOf (42 , 43 );
132
131
}
133
132
134
133
@ Test
@@ -139,7 +138,7 @@ public void testContainsAnyOf_fails() throws Exception {
139
138
140
139
@ Test
141
140
public void testContainsAnyIn () throws Exception {
142
- assertThat (IntStream .of (42 )).containsAnyIn (asList (42 , 43 ));
141
+ Truth8 . assertThat (IntStream .of (42 )).containsAnyIn (asList (42 , 43 ));
143
142
}
144
143
145
144
@ Test
@@ -151,7 +150,7 @@ public void testContainsAnyIn_fails() throws Exception {
151
150
152
151
@ Test
153
152
public void testDoesNotContain () throws Exception {
154
- assertThat (IntStream .of (42 )).doesNotContain (43 );
153
+ Truth8 . assertThat (IntStream .of (42 )).doesNotContain (43 );
155
154
}
156
155
157
156
@ Test
@@ -162,7 +161,7 @@ public void testDoesNotContain_fails() throws Exception {
162
161
163
162
@ Test
164
163
public void testContainsNoneOf () throws Exception {
165
- assertThat (IntStream .of (42 )).containsNoneOf (43 , 44 );
164
+ Truth8 . assertThat (IntStream .of (42 )).containsNoneOf (43 , 44 );
166
165
}
167
166
168
167
@ Test
@@ -173,7 +172,7 @@ public void testContainsNoneOf_fails() throws Exception {
173
172
174
173
@ Test
175
174
public void testContainsNoneIn () throws Exception {
176
- assertThat (IntStream .of (42 )).containsNoneIn (asList (43 , 44 ));
175
+ Truth8 . assertThat (IntStream .of (42 )).containsNoneIn (asList (43 , 44 ));
177
176
}
178
177
179
178
@ Test
@@ -185,7 +184,7 @@ public void testContainsNoneIn_fails() throws Exception {
185
184
186
185
@ Test
187
186
public void testContainsAtLeast () throws Exception {
188
- assertThat (IntStream .of (42 , 43 )).containsAtLeast (42 , 43 );
187
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsAtLeast (42 , 43 );
189
188
}
190
189
191
190
@ Test
@@ -197,7 +196,7 @@ public void testContainsAtLeast_fails() throws Exception {
197
196
198
197
@ Test
199
198
public void testContainsAtLeast_inOrder () throws Exception {
200
- assertThat (IntStream .of (42 , 43 )).containsAtLeast (42 , 43 ).inOrder ();
199
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsAtLeast (42 , 43 ).inOrder ();
201
200
}
202
201
203
202
@ Test
@@ -216,7 +215,7 @@ public void testContainsAtLeast_inOrder_fails() throws Exception {
216
215
217
216
@ Test
218
217
public void testContainsAtLeastElementsIn () throws Exception {
219
- assertThat (IntStream .of (42 , 43 )).containsAtLeastElementsIn (asList (42 , 43 ));
218
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsAtLeastElementsIn (asList (42 , 43 ));
220
219
}
221
220
222
221
@ Test
@@ -231,7 +230,7 @@ public void testContainsAtLeastElementsIn_fails() throws Exception {
231
230
232
231
@ Test
233
232
public void testContainsAtLeastElementsIn_inOrder () throws Exception {
234
- assertThat (IntStream .of (42 , 43 )).containsAtLeastElementsIn (asList (42 , 43 )).inOrder ();
233
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsAtLeastElementsIn (asList (42 , 43 )).inOrder ();
235
234
}
236
235
237
236
@ Test
@@ -253,7 +252,7 @@ public void testContainsAtLeastElementsIn_inOrder_fails() throws Exception {
253
252
254
253
@ Test
255
254
public void testContainsExactly () throws Exception {
256
- assertThat (IntStream .of (42 , 43 )).containsExactly (42 , 43 );
255
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsExactly (42 , 43 );
257
256
}
258
257
259
258
@ Test
@@ -266,7 +265,7 @@ public void testContainsExactly_fails() throws Exception {
266
265
267
266
@ Test
268
267
public void testContainsExactly_inOrder () throws Exception {
269
- assertThat (IntStream .of (42 , 43 )).containsExactly (42 , 43 ).inOrder ();
268
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsExactly (42 , 43 ).inOrder ();
270
269
}
271
270
272
271
@ Test
@@ -281,8 +280,8 @@ public void testContainsExactly_inOrder_fails() throws Exception {
281
280
282
281
@ Test
283
282
public void testContainsExactlyElementsIn () throws Exception {
284
- assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (42 , 43 ));
285
- assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (43 , 42 ));
283
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (42 , 43 ));
284
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (43 , 42 ));
286
285
}
287
286
288
287
@ Test
@@ -297,7 +296,7 @@ public void testContainsExactlyElementsIn_fails() throws Exception {
297
296
298
297
@ Test
299
298
public void testContainsExactlyElementsIn_inOrder () throws Exception {
300
- assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (42 , 43 )).inOrder ();
299
+ Truth8 . assertThat (IntStream .of (42 , 43 )).containsExactlyElementsIn (asList (42 , 43 )).inOrder ();
301
300
}
302
301
303
302
@ Test
@@ -315,14 +314,14 @@ public void testContainsExactlyElementsIn_inOrder_fails() throws Exception {
315
314
316
315
@ Test
317
316
public void testContainsExactlyElementsIn_inOrder_intStream () throws Exception {
318
- assertThat (IntStream .of (1 , 2 , 3 , 4 )).containsExactly (1 , 2 , 3 , 4 ).inOrder ();
317
+ Truth8 . assertThat (IntStream .of (1 , 2 , 3 , 4 )).containsExactly (1 , 2 , 3 , 4 ).inOrder ();
319
318
}
320
319
321
320
@ Test
322
321
public void testIsInOrder () {
323
- assertThat (IntStream .of ()).isInOrder ();
324
- assertThat (IntStream .of (1 )).isInOrder ();
325
- assertThat (IntStream .of (1 , 1 , 2 , 3 , 3 , 3 , 4 )).isInOrder ();
322
+ Truth8 . assertThat (IntStream .of ()).isInOrder ();
323
+ Truth8 . assertThat (IntStream .of (1 )).isInOrder ();
324
+ Truth8 . assertThat (IntStream .of (1 , 1 , 2 , 3 , 3 , 3 , 4 )).isInOrder ();
326
325
}
327
326
328
327
@ Test
@@ -333,9 +332,9 @@ public void testIsInOrder_fails() {
333
332
334
333
@ Test
335
334
public void testIsInStrictOrder () {
336
- assertThat (IntStream .of ()).isInStrictOrder ();
337
- assertThat (IntStream .of (1 )).isInStrictOrder ();
338
- assertThat (IntStream .of (1 , 2 , 3 , 4 )).isInStrictOrder ();
335
+ Truth8 . assertThat (IntStream .of ()).isInStrictOrder ();
336
+ Truth8 . assertThat (IntStream .of (1 )).isInStrictOrder ();
337
+ Truth8 . assertThat (IntStream .of (1 , 2 , 3 , 4 )).isInStrictOrder ();
339
338
}
340
339
341
340
@ Test
0 commit comments