@@ -12,61 +12,61 @@ namespace Reactive.Streams.TCK.Tests
12
12
public class SubscriberBlackboxVerificationTest : TCKVerificationSupport
13
13
{
14
14
[ Test ]
15
- public void required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest_shouldFailBy_notGettingRequestCall ( )
15
+ public void Required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest_shouldFailBy_notGettingRequestCall ( )
16
16
=> RequireTestFailure (
17
- ( ) => NoopSubscriberVerification ( ) . required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest ( ) ,
17
+ ( ) => NoopSubscriberVerification ( ) . Required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest ( ) ,
18
18
"Did not receive expected `Request` call within" ) ;
19
19
20
20
[ Test ]
21
- public void required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest_shouldPass ( )
22
- => SimpleSubscriberVerification ( ) . required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest ( ) ;
21
+ public void Required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest_shouldPass ( )
22
+ => SimpleSubscriberVerification ( ) . Required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest ( ) ;
23
23
24
24
[ Test ]
25
- public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_shouldFail_dueToCallingRequest ( )
25
+ public void Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_shouldFail_dueToCallingRequest ( )
26
26
{
27
27
ISubscription subscription = null ;
28
28
var subscriber = new LamdaSubscriber < int ? > ( onSubscribe : sub => subscription = sub ,
29
29
onComplete : ( ) => subscription . Request ( 1 ) ) ;
30
30
var verification = CustomSubscriberVerification ( subscriber ) ;
31
- RequireTestFailure ( ( ) => verification . required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete ( ) ,
31
+ RequireTestFailure ( ( ) => verification . Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete ( ) ,
32
32
"Subscription.Request MUST NOT be called from Subscriber.OnComplete (Rule 2.3)!" ) ;
33
33
}
34
34
35
35
[ Test ]
36
- public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_shouldFail_dueToCallingCancel ( )
36
+ public void Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_shouldFail_dueToCallingCancel ( )
37
37
{
38
38
ISubscription subscription = null ;
39
39
var subscriber = new LamdaSubscriber < int ? > ( onSubscribe : sub => subscription = sub ,
40
40
onComplete : ( ) => subscription . Cancel ( ) ) ;
41
41
var verification = CustomSubscriberVerification ( subscriber ) ;
42
- RequireTestFailure ( ( ) => verification . required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete ( ) ,
42
+ RequireTestFailure ( ( ) => verification . Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete ( ) ,
43
43
"Subscription.Cancel MUST NOT be called from Subscriber.OnComplete (Rule 2.3)!" ) ;
44
44
}
45
45
46
46
[ Test ]
47
- public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError_shouldFail_dueToCallingRequest ( )
47
+ public void Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError_shouldFail_dueToCallingRequest ( )
48
48
{
49
49
ISubscription subscription = null ;
50
50
var subscriber = new LamdaSubscriber < int ? > ( onSubscribe : sub => subscription = sub ,
51
51
onError : _ => subscription . Request ( 1 ) ) ;
52
52
var verification = CustomSubscriberVerification ( subscriber ) ;
53
- RequireTestFailure ( ( ) => verification . required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError ( ) ,
53
+ RequireTestFailure ( ( ) => verification . Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError ( ) ,
54
54
"Subscription.Request MUST NOT be called from Subscriber.OnError (Rule 2.3)!" ) ;
55
55
}
56
56
57
57
[ Test ]
58
- public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError_shouldFail_dueToCallingCancel ( )
58
+ public void Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError_shouldFail_dueToCallingCancel ( )
59
59
{
60
60
ISubscription subscription = null ;
61
61
var subscriber = new LamdaSubscriber < int ? > ( onSubscribe : sub => subscription = sub ,
62
62
onError : _ => subscription . Cancel ( ) ) ;
63
63
var verification = CustomSubscriberVerification ( subscriber ) ;
64
- RequireTestFailure ( ( ) => verification . required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError ( ) ,
64
+ RequireTestFailure ( ( ) => verification . Required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError ( ) ,
65
65
"Subscription.Cancel MUST NOT be called from Subscriber.OnError (Rule 2.3)!" ) ;
66
66
}
67
67
68
68
[ Test ]
69
- public void required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal_shouldFail ( )
69
+ public void Required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal_shouldFail ( )
70
70
{
71
71
ISubscription subscription = null ;
72
72
var subscriber = new LamdaSubscriber < int ? > ( onSubscribe : sub =>
@@ -75,50 +75,50 @@ public void required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAn
75
75
sub . Request ( 1 ) ; // this is wrong, as one should always check if should accept or reject the subscription
76
76
} ) ;
77
77
var verification = CustomSubscriberVerification ( subscriber ) ;
78
- RequireTestFailure ( ( ) => verification . required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal ( ) ,
78
+ RequireTestFailure ( ( ) => verification . Required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal ( ) ,
79
79
"illegally called `Subscription.Request(1)`" ) ;
80
80
}
81
81
82
82
[ Test ]
83
- public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall_shouldFail ( )
83
+ public void Required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall_shouldFail ( )
84
84
=> RequireTestFailure (
85
- ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall ( ) ,
85
+ ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . Required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall ( ) ,
86
86
"did not call `RegisterOnComplete()`" ) ;
87
87
88
88
[ Test ]
89
- public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall_shouldPass_withNoopSubscriber ( )
89
+ public void Required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall_shouldPass_withNoopSubscriber ( )
90
90
=> CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) )
91
- . required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall ( ) ;
91
+ . Required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall ( ) ;
92
92
93
93
[ Test ]
94
- public void required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall_shouldFail ( )
94
+ public void Required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall_shouldFail ( )
95
95
{
96
96
var subscriber = new LamdaSubscriber < int ? > ( onError : cause =>
97
97
{
98
98
// this is wrong in many ways (incl. spec violation), but aims to simulate user code which "blows up" when handling the onError signal
99
99
throw new Exception ( "Wrong, don't do this!" , cause ) ; // don't do this
100
100
} ) ;
101
101
var verification = CustomSubscriberVerification ( subscriber ) ;
102
- RequireTestFailure ( ( ) => verification . required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall ( ) ,
102
+ RequireTestFailure ( ( ) => verification . Required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall ( ) ,
103
103
"Test Exception: Boom!" ) ; // checks that the expected exception was delivered to onError, we don't expect anyone to implement onError so weirdly
104
104
}
105
105
106
106
[ Test ]
107
- public void required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onSubscribe ( )
107
+ public void Required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onSubscribe ( )
108
108
=> RequireTestFailure (
109
- ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
109
+ ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . Required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
110
110
"OnSubscribe(null) did not throw ArgumentNullException" ) ;
111
111
112
112
[ Test ]
113
- public void required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onNext ( )
113
+ public void Required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onNext ( )
114
114
=> RequireTestFailure (
115
- ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
115
+ ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . Required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
116
116
"OnNext(null) did not throw ArgumentNullException" ) ;
117
117
118
118
[ Test ]
119
- public void required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onError ( )
119
+ public void Required_spec213_blackbox_mustThrowNullPointerExceptionWhenParametersAreNull_mustFailOnIgnoredNull_onError ( )
120
120
=> RequireTestFailure (
121
- ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
121
+ ( ) => CustomSubscriberVerification ( new LamdaSubscriber < int ? > ( ) ) . Required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull ( ) ,
122
122
"OnError(null) did not throw ArgumentNullException" ) ;
123
123
124
124
0 commit comments