@@ -35,7 +35,7 @@ public class ReactiveSocketServerProtocolTest {
35
35
36
36
@ Test
37
37
public void testRequestResponseSuccess () {
38
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
38
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
39
39
request -> toPublisher (just (request + " world" )),
40
40
null );
41
41
@@ -54,7 +54,7 @@ public void testRequestResponseSuccess() {
54
54
55
55
@ Test
56
56
public void testRequestResponseError () {
57
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
57
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
58
58
request -> toPublisher (error (new Exception ("Request Not Found" ))),
59
59
null );
60
60
@@ -78,7 +78,7 @@ public void testRequestResponseCancel() {
78
78
.cast (String .class )
79
79
.doOnUnsubscribe (() -> unsubscribed .set (true ));
80
80
81
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
81
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
82
82
request -> toPublisher (delayed ),
83
83
null );
84
84
@@ -97,7 +97,7 @@ public void testRequestResponseCancel() {
97
97
98
98
@ Test
99
99
public void testRequestStreamSuccess () {
100
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
100
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
101
101
null ,
102
102
request -> toPublisher (range (Integer .parseInt (request ), 10 ).map (i -> i + "!" )));
103
103
@@ -126,7 +126,7 @@ public void testRequestStreamSuccess() {
126
126
127
127
@ Test
128
128
public void testRequestStreamError () {
129
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
129
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
130
130
null ,
131
131
request -> toPublisher (range (Integer .parseInt (request ), 3 )
132
132
.map (i -> i + "!" )
@@ -158,7 +158,7 @@ public void testRequestStreamError() {
158
158
@ Test
159
159
public void testRequestStreamCancel () {
160
160
TestScheduler ts = Schedulers .test ();
161
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
161
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
162
162
null ,
163
163
request -> toPublisher (interval (1000 , TimeUnit .MILLISECONDS , ts ).map (i -> i + "!" )));
164
164
@@ -196,7 +196,7 @@ public void testRequestStreamCancel() {
196
196
@ Test
197
197
public void testMultiplexedStreams () {
198
198
TestScheduler ts = Schedulers .test ();
199
- ReactiveSocketServerProtocol p = new ReactiveSocketServerProtocol (
199
+ ReactiveSocketServerProtocol p = ReactiveSocketServerProtocol . create (
200
200
null ,
201
201
request -> toPublisher (interval (1000 , TimeUnit .MILLISECONDS , ts ).map (i -> i + "_" + request )));
202
202
0 commit comments