12
12
import org .testng .annotations .BeforeMethod ;
13
13
import org .testng .annotations .Test ;
14
14
15
- import static org .reactivestreams .tck .Annotations .NotVerified ;
16
- import static org .reactivestreams .tck .Annotations .Required ;
17
15
import static org .reactivestreams .tck .SubscriberWhiteboxVerification .BlackboxSubscriberProxy ;
18
16
19
17
/**
@@ -68,8 +66,8 @@ public void setUp() throws Exception {
68
66
////////////////////// SPEC RULE VERIFICATION ///////////////////////////////
69
67
70
68
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.1
71
- @ Override @ Required @ Test
72
- public void spec201_blackbox_mustSignalDemandViaSubscriptionRequest () throws Throwable {
69
+ @ Override @ Test
70
+ public void required___spec201_blackbox_mustSignalDemandViaSubscriptionRequest () throws Throwable {
73
71
blackboxSubscriberTest (new BlackboxTestStageTestRun () {
74
72
@ Override
75
73
public void run (BlackboxTestStage stage ) throws InterruptedException {
@@ -83,14 +81,14 @@ public void run(BlackboxTestStage stage) throws InterruptedException {
83
81
}
84
82
85
83
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.2
86
- @ Override @ NotVerified @ Test
87
- public void spec202_blackbox_shouldAsynchronouslyDispatch () throws Exception {
84
+ @ Override @ Test
85
+ public void unverified___spec202_blackbox_shouldAsynchronouslyDispatch () throws Exception {
88
86
notVerified (); // cannot be meaningfully tested, or can it?
89
87
}
90
88
91
89
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.3
92
- @ Override @ Required @ Test
93
- public void spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete () throws Throwable {
90
+ @ Override @ Test
91
+ public void required___spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete () throws Throwable {
94
92
blackboxSubscriberWithoutSetupTest (new BlackboxTestStageTestRun () {
95
93
@ Override
96
94
public void run (BlackboxTestStage stage ) throws Throwable {
@@ -126,8 +124,8 @@ public void cancel() {
126
124
}
127
125
128
126
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.3
129
- @ Override @ Required @ Test
130
- public void spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError () throws Throwable {
127
+ @ Override @ Test
128
+ public void required___spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError () throws Throwable {
131
129
blackboxSubscriberWithoutSetupTest (new BlackboxTestStageTestRun () {
132
130
@ Override
133
131
public void run (BlackboxTestStage stage ) throws Throwable {
@@ -165,14 +163,14 @@ public void cancel() {
165
163
}
166
164
167
165
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.4
168
- @ Override @ NotVerified @ Test
169
- public void spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError () throws Exception {
166
+ @ Override @ Test
167
+ public void unverified___spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError () throws Exception {
170
168
notVerified (); // cannot be meaningfully tested, or can it?
171
169
}
172
170
173
171
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.5
174
- @ Override @ Required @ Test
175
- public void spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal () throws Exception {
172
+ @ Override @ Test
173
+ public void required___spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal () throws Exception {
176
174
new BlackboxTestStage (env ) {{
177
175
// try to subscribe another time, if the subscriber calls `probe.registerOnSubscribe` the test will fail
178
176
final TestEnvironment .Latch secondSubscriptionCancelled = new TestEnvironment .Latch (env );
@@ -200,27 +198,27 @@ public String toString() {
200
198
}
201
199
202
200
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.6
203
- @ Override @ NotVerified @ Test
204
- public void spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid () throws Exception {
201
+ @ Override @ Test
202
+ public void unverified___spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid () throws Exception {
205
203
notVerified (); // cannot be meaningfully tested, or can it?
206
204
}
207
205
208
206
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.7
209
- @ Override @ NotVerified @ Test
210
- public void spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization () throws Exception {
207
+ @ Override @ Test
208
+ public void unverified___spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization () throws Exception {
211
209
notVerified (); // cannot be meaningfully tested, or can it?
212
210
// the same thread part of the clause can be verified but that is not very useful, or is it?
213
211
}
214
212
215
213
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.8
216
- @ Override @ NotVerified @ Test
217
- public void spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel () throws Throwable {
214
+ @ Override @ Test
215
+ public void unverified___spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel () throws Throwable {
218
216
notVerified (); // cannot be meaningfully tested as black box, or can it?
219
217
}
220
218
221
219
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.9
222
- @ Override @ Required @ Test
223
- public void spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall () throws Throwable {
220
+ @ Override @ Test
221
+ public void required___spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall () throws Throwable {
224
222
blackboxSubscriberWithoutSetupTest (new BlackboxTestStageTestRun () {
225
223
@ Override
226
224
public void run (BlackboxTestStage stage ) throws Throwable {
@@ -239,8 +237,8 @@ public void run(BlackboxTestStage stage) throws Throwable {
239
237
}
240
238
241
239
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.9
242
- @ Override @ Required @ Test
243
- public void spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall () throws Throwable {
240
+ @ Override @ Test
241
+ public void required___spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall () throws Throwable {
244
242
blackboxSubscriberWithoutSetupTest (new BlackboxTestStageTestRun () {
245
243
@ Override
246
244
public void run (BlackboxTestStage stage ) throws Throwable {
@@ -263,8 +261,8 @@ public void subscribe(Subscriber<? super T> s) {
263
261
}
264
262
265
263
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.10
266
- @ Override @ Required @ Test
267
- public void spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall () throws Throwable {
264
+ @ Override @ Test
265
+ public void required___spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall () throws Throwable {
268
266
blackboxSubscriberTest (new BlackboxTestStageTestRun () {
269
267
@ Override
270
268
@ SuppressWarnings ("ThrowableResultOfMethodCallIgnored" )
@@ -276,64 +274,64 @@ public void run(BlackboxTestStage stage) throws Throwable {
276
274
}
277
275
278
276
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.11
279
- @ Override @ NotVerified @ Test
280
- public void spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents () throws Exception {
277
+ @ Override @ Test
278
+ public void unverified___spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents () throws Exception {
281
279
notVerified (); // cannot be meaningfully tested, or can it?
282
280
}
283
281
284
282
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.12
285
- @ Override @ Required @ Test
286
- public void spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality () throws Throwable {
283
+ @ Override @ Test
284
+ public void required___spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality () throws Throwable {
287
285
notVerified (); // cannot be meaningfully tested as black box, or can it?
288
286
}
289
287
290
288
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
291
- @ Override @ NotVerified @ Test
292
- public void spec213_blackbox_failingOnSignalInvocation () throws Exception {
289
+ @ Override @ Test
290
+ public void unverified___spec213_blackbox_failingOnSignalInvocation () throws Exception {
293
291
notVerified (); // cannot be meaningfully tested, or can it?
294
292
}
295
293
296
294
////////////////////// SUBSCRIPTION SPEC RULE VERIFICATION //////////////////
297
295
298
296
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.1
299
- @ Override @ NotVerified @ Test
300
- public void spec301_blackbox_mustNotBeCalledOutsideSubscriberContext () throws Exception {
297
+ @ Override @ Test
298
+ public void unverified___spec301_blackbox_mustNotBeCalledOutsideSubscriberContext () throws Exception {
301
299
notVerified (); // cannot be meaningfully tested, or can it?
302
300
}
303
301
304
302
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.8
305
- @ Override @ Required @ Test
306
- public void spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced () throws Throwable {
303
+ @ Override @ Test
304
+ public void required___spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced () throws Throwable {
307
305
notVerified (); // cannot be meaningfully tested as black box, or can it?
308
306
}
309
307
310
308
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.10
311
- @ Override @ NotVerified @ Test
312
- public void spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber () throws Exception {
309
+ @ Override @ Test
310
+ public void unverified___spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber () throws Exception {
313
311
notVerified (); // cannot be meaningfully tested, or can it?
314
312
}
315
313
316
314
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.11
317
- @ Override @ NotVerified @ Test
318
- public void spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError () throws Exception {
315
+ @ Override @ Test
316
+ public void unverified___spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError () throws Exception {
319
317
notVerified (); // cannot be meaningfully tested, or can it?
320
318
}
321
319
322
320
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.14
323
- @ Override @ NotVerified @ Test
324
- public void spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists () throws Exception {
321
+ @ Override @ Test
322
+ public void unverified___spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists () throws Exception {
325
323
notVerified (); // cannot be meaningfully tested, or can it?
326
324
}
327
325
328
326
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.15
329
- @ Override @ NotVerified @ Test
330
- public void spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError () throws Exception {
327
+ @ Override @ Test
328
+ public void unverified___spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError () throws Exception {
331
329
notVerified (); // cannot be meaningfully tested, or can it?
332
330
}
333
331
334
332
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.16
335
- @ Override @ NotVerified @ Test
336
- public void spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber () throws Exception {
333
+ @ Override @ Test
334
+ public void unverified___spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber () throws Exception {
337
335
notVerified (); // cannot be meaningfully tested, or can it?
338
336
}
339
337
0 commit comments