@@ -35,11 +35,7 @@ public class NexusServiceClientWorkflowOperationTest {
3535 public void executeWorkflowOperationSuccess ()
3636 throws OperationStillRunningException , OperationException {
3737 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
38- testWorkflowRule
39- .getWorkflowClient ()
40- .newNexusServiceClient (
41- TestNexusServices .TestNexusService1 .class ,
42- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
38+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
4339
4440 Assert .assertEquals (
4541 "Hello World" ,
@@ -59,11 +55,7 @@ public void executeWorkflowOperationSuccess()
5955 @ Test
6056 public void executeWorkflowOperationFail () {
6157 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
62- testWorkflowRule
63- .getWorkflowClient ()
64- .newNexusServiceClient (
65- TestNexusServices .TestNexusService1 .class ,
66- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
58+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
6759
6860 OperationException oe =
6961 Assert .assertThrows (
@@ -92,12 +84,7 @@ public void executeWorkflowOperationFail() {
9284 @ Test
9385 public void executeWorkflowOperationStillRunning () {
9486 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
95- testWorkflowRule
96- .getWorkflowClient ()
97- .newNexusServiceClient (
98- TestNexusServices .TestNexusService1 .class ,
99- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
100-
87+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
10188 Assert .assertThrows (
10289 OperationStillRunningException .class ,
10390 () ->
@@ -120,11 +107,7 @@ public void executeWorkflowOperationStillRunning() {
120107 public void createHandle ()
121108 throws OperationException , OperationStillRunningException , InterruptedException {
122109 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
123- testWorkflowRule
124- .getWorkflowClient ()
125- .newNexusServiceClient (
126- TestNexusServices .TestNexusService1 .class ,
127- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
110+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
128111
129112 StartOperationResponse <String > startResult =
130113 serviceClient .startOperation (TestNexusServices .TestNexusService1 ::operation , "World" );
@@ -145,11 +128,7 @@ public void createHandle()
145128 public void createHandleUntyped ()
146129 throws OperationException , OperationStillRunningException , InterruptedException {
147130 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
148- testWorkflowRule
149- .getWorkflowClient ()
150- .newNexusServiceClient (
151- TestNexusServices .TestNexusService1 .class ,
152- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
131+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
153132
154133 StartOperationResponse <String > startResult =
155134 serviceClient .startOperation (TestNexusServices .TestNexusService1 ::operation , "World" );
@@ -170,11 +149,7 @@ public void createHandleUntyped()
170149 @ Test
171150 public void createInvalidHandle () throws JsonProcessingException {
172151 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
173- testWorkflowRule
174- .getWorkflowClient ()
175- .newNexusServiceClient (
176- TestNexusServices .TestNexusService1 .class ,
177- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
152+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
178153
179154 OperationHandle <String > badHandle =
180155 serviceClient .newHandle (TestNexusServices .TestNexusService1 ::operation , "BAD_TOKEN" );
@@ -211,11 +186,7 @@ public void createInvalidHandle() throws JsonProcessingException {
211186 @ Test
212187 public void startAsyncOperation () throws OperationException , OperationStillRunningException {
213188 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
214- testWorkflowRule
215- .getWorkflowClient ()
216- .newNexusServiceClient (
217- TestNexusServices .TestNexusService1 .class ,
218- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
189+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
219190
220191 StartOperationResponse <String > startResult =
221192 serviceClient .startOperation (TestNexusServices .TestNexusService1 ::operation , "World" );
@@ -241,11 +212,7 @@ public void startAsyncOperation() throws OperationException, OperationStillRunni
241212 @ Test
242213 public void cancelAsyncOperation () throws OperationException {
243214 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
244- testWorkflowRule
245- .getWorkflowClient ()
246- .newNexusServiceClient (
247- TestNexusServices .TestNexusService1 .class ,
248- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
215+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
249216
250217 StartOperationResponse <String > startResult =
251218 serviceClient .startOperation (TestNexusServices .TestNexusService1 ::operation , "World" );
@@ -271,11 +238,7 @@ public void cancelAsyncOperation() throws OperationException {
271238 @ Test
272239 public void cancelAsyncOperationAsync () {
273240 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
274- testWorkflowRule
275- .getWorkflowClient ()
276- .newNexusServiceClient (
277- TestNexusServices .TestNexusService1 .class ,
278- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
241+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
279242
280243 StartOperationResponse <String > startResult =
281244 serviceClient
@@ -304,11 +267,7 @@ public void cancelAsyncOperationAsync() {
304267 @ Test
305268 public void startAsyncOperationAsync () {
306269 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
307- testWorkflowRule
308- .getWorkflowClient ()
309- .newNexusServiceClient (
310- TestNexusServices .TestNexusService1 .class ,
311- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
270+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
312271
313272 StartOperationResponse <String > startResult =
314273 serviceClient
@@ -342,11 +301,7 @@ public void startAsyncOperationAsync() {
342301 @ Test
343302 public void startWorkflowOperationFail () throws OperationException {
344303 ServiceClient <TestNexusServices .TestNexusService1 > serviceClient =
345- testWorkflowRule
346- .getWorkflowClient ()
347- .newNexusServiceClient (
348- TestNexusServices .TestNexusService1 .class ,
349- testWorkflowRule .getNexusEndpoint ().getSpec ().getName ());
304+ testWorkflowRule .newNexusServiceClient (TestNexusServices .TestNexusService1 .class );
350305
351306 StartOperationResponse <String > startResult =
352307 serviceClient .startOperation (TestNexusServices .TestNexusService1 ::operation , "fail" );
0 commit comments