File tree Expand file tree Collapse file tree
experimental/fluent/func/src
main/java/io/serverlessworkflow/fluent/func
test/java/io/serverlessworkflow/fluent/func
fluent/spec/src/test/java/io/serverlessworkflow/fluent/spec/dsl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323import io .serverlessworkflow .fluent .func .spi .FuncDoFluent ;
2424import io .serverlessworkflow .fluent .spec .BaseTaskItemListBuilder ;
2525import io .serverlessworkflow .fluent .spec .TaskItemListBuilder ;
26+ import io .serverlessworkflow .fluent .spec .WaitTaskBuilder ;
2627import io .serverlessworkflow .fluent .spec .WorkflowTaskBuilder ;
2728import java .util .List ;
2829import java .util .function .Consumer ;
@@ -222,10 +223,10 @@ public FuncTaskItemListBuilder wait(
222223 }
223224
224225 public FuncTaskItemListBuilder wait (
225- String name , Consumer <io . serverlessworkflow . fluent . spec . WaitTaskBuilder > itemsConfigurer ) {
226+ String name , Consumer <WaitTaskBuilder > itemsConfigurer ) {
226227 name = this .defaultNameAndRequireConfig (name , itemsConfigurer , "wait" );
227- final io . serverlessworkflow . fluent . spec . WaitTaskBuilder waitTaskBuilder =
228- new io . serverlessworkflow . fluent . spec . WaitTaskBuilder ();
228+ final WaitTaskBuilder waitTaskBuilder =
229+ new WaitTaskBuilder ();
229230 itemsConfigurer .accept (waitTaskBuilder );
230231 return this .addTaskItem (new TaskItem (name , new Task ().withWaitTask (waitTaskBuilder .build ())));
231232 }
Original file line number Diff line number Diff line change 1515 */
1616package io .serverlessworkflow .fluent .func ;
1717
18+ import java .time .Duration ;
19+
1820import static io .serverlessworkflow .fluent .func .dsl .FuncDSL .tasks ;
1921import static io .serverlessworkflow .fluent .spec .dsl .DSL .timeoutSeconds ;
2022import static org .junit .jupiter .api .Assertions .assertEquals ;
@@ -175,7 +177,7 @@ public void when_wait_millis_named() {
175177 public void when_wait_with_duration () {
176178 Workflow wf =
177179 FuncWorkflowBuilder .workflow ("waitFlow" )
178- .tasks (tasks (FuncDSL .wait (java . time . Duration .ofMinutes (5 ).plusSeconds (30 ))))
180+ .tasks (tasks (FuncDSL .wait (Duration .ofMinutes (5 ).plusSeconds (30 ))))
179181 .build ();
180182
181183 var inline = wf .getDo ().get (0 ).getTask ().getWaitTask ().getWait ().getDurationInline ();
@@ -187,7 +189,7 @@ public void when_wait_with_duration() {
187189 public void when_wait_with_duration_named () {
188190 Workflow wf =
189191 FuncWorkflowBuilder .workflow ("waitFlow" )
190- .tasks (tasks (FuncDSL .wait ("custom" , java . time . Duration .ofHours (1 ))))
192+ .tasks (tasks (FuncDSL .wait ("custom" , Duration .ofHours (1 ))))
191193 .build ();
192194
193195 assertEquals ("custom" , wf .getDo ().get (0 ).getName ());
Original file line number Diff line number Diff line change 1515 */
1616package io .serverlessworkflow .fluent .spec .dsl ;
1717
18+ import java .time .Duration ;
19+
1820import static io .serverlessworkflow .fluent .spec .dsl .DSL .waitMinutes ;
1921import static io .serverlessworkflow .fluent .spec .dsl .DSL .waitSeconds ;
2022import static org .assertj .core .api .Assertions .assertThat ;
@@ -170,7 +172,7 @@ public void when_wait_millis_named() {
170172 public void when_wait_with_duration_unnamed () {
171173 Workflow wf =
172174 WorkflowBuilder .workflow ("waitFlow" , "myNs" , "1.0.0" )
173- .tasks (DSL .wait (java . time . Duration .ofMinutes (5 ).plusSeconds (30 )))
175+ .tasks (DSL .wait (Duration .ofMinutes (5 ).plusSeconds (30 )))
174176 .build ();
175177
176178 var waitTask = wf .getDo ().get (0 ).getTask ().getWaitTask ();
@@ -184,7 +186,7 @@ public void when_wait_with_duration_unnamed() {
184186 public void when_wait_with_duration_named () {
185187 Workflow wf =
186188 WorkflowBuilder .workflow ("waitFlow" , "myNs" , "1.0.0" )
187- .tasks (DSL .wait ("customDelay" , java . time . Duration .ofHours (1 ).plusMinutes (15 )))
189+ .tasks (DSL .wait ("customDelay" , Duration .ofHours (1 ).plusMinutes (15 )))
188190 .build ();
189191
190192 assertThat (wf .getDo ().get (0 ).getName ()).isEqualTo ("customDelay" );
You can’t perform that action at this time.
0 commit comments