Skip to content

Commit

Permalink
rename helper
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanos committed Nov 30, 2024
1 parent 65c304c commit 2f4abe8
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class UpdateWithStartTest {
TestMultiArgWorkflowImpl.class)
.build();

private <T> Results updateWithStart(
private <T> Results assertUpdateWithStart(
Class<T> stubClass,
Object[] args,
Function<T, WithStartWorkflowOperation<String>> startOperationProvider,
Expand Down Expand Up @@ -179,7 +179,7 @@ private <T> Results updateWithStart(
public void startWorkflowAndUpdate() throws ExecutionException, InterruptedException {
// no arg
Results results =
updateWithStart(
assertUpdateWithStart(
TestNoArgsWorkflowFunc.class,
new Object[] {},
(TestNoArgsWorkflowFunc stub) -> new WithStartWorkflowOperation<>(stub::func),
Expand All @@ -192,7 +192,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("func", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
TestNoArgsWorkflowProc.class,
new Object[] {},
(TestNoArgsWorkflowProc stub) -> new WithStartWorkflowOperation<>(stub::proc),
Expand All @@ -206,7 +206,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 1 arg
results =
updateWithStart(
assertUpdateWithStart(
Test1ArgWorkflowFunc.class,
new Object[] {"1"},
(Test1ArgWorkflowFunc stub) -> new WithStartWorkflowOperation<>(stub::func1, "1"),
Expand All @@ -220,7 +220,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("1", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test1ArgWorkflowProc.class,
new Object[] {"1"},
(Test1ArgWorkflowProc stub) -> new WithStartWorkflowOperation<>(stub::proc1, "1"),
Expand All @@ -235,7 +235,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 2 args
results =
updateWithStart(
assertUpdateWithStart(
Test2ArgWorkflowFunc.class,
new Object[] {"1", 2},
(Test2ArgWorkflowFunc stub) -> new WithStartWorkflowOperation<>(stub::func2, "1", 2),
Expand All @@ -249,7 +249,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("12", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test2ArgWorkflowProc.class,
new Object[] {"1", 2},
(Test2ArgWorkflowProc stub) -> new WithStartWorkflowOperation<>(stub::proc2, "1", 2),
Expand All @@ -264,7 +264,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 3 args
results =
updateWithStart(
assertUpdateWithStart(
Test3ArgWorkflowFunc.class,
new Object[] {"1", 2, 3},
(Test3ArgWorkflowFunc stub) -> new WithStartWorkflowOperation<>(stub::func3, "1", 2, 3),
Expand All @@ -278,7 +278,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("123", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test3ArgWorkflowProc.class,
new Object[] {"1", 2, 3},
(Test3ArgWorkflowProc stub) -> new WithStartWorkflowOperation<>(stub::proc3, "1", 2, 3),
Expand All @@ -293,7 +293,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 4 args
results =
updateWithStart(
assertUpdateWithStart(
Test4ArgWorkflowFunc.class,
new Object[] {"1", 2, 3, 4},
(Test4ArgWorkflowFunc stub) ->
Expand All @@ -308,7 +308,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("1234", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test4ArgWorkflowProc.class,
new Object[] {"1", 2, 3, 4},
(Test4ArgWorkflowProc stub) ->
Expand All @@ -324,7 +324,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 5 args
results =
updateWithStart(
assertUpdateWithStart(
Test5ArgWorkflowFunc.class,
new Object[] {"1", 2, 3, 4, 5},
(Test5ArgWorkflowFunc stub) ->
Expand All @@ -339,7 +339,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("12345", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test5ArgWorkflowProc.class,
new Object[] {"1", 2, 3, 4, 5},
(Test5ArgWorkflowProc stub) ->
Expand All @@ -355,7 +355,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep

// 6 args
results =
updateWithStart(
assertUpdateWithStart(
Test6ArgWorkflowFunc.class,
new Object[] {"1", 2, 3, 4, 5, 6},
(Test6ArgWorkflowFunc stub) ->
Expand All @@ -370,7 +370,7 @@ public void startWorkflowAndUpdate() throws ExecutionException, InterruptedExcep
assertEquals("123456", results.workflowResult);

results =
updateWithStart(
assertUpdateWithStart(
Test6ArgWorkflowProc.class,
new Object[] {"1", 2, 3, 4, 5, 6},
(Test6ArgWorkflowProc stub) ->
Expand Down

0 comments on commit 2f4abe8

Please sign in to comment.