-
Notifications
You must be signed in to change notification settings - Fork 0
Step
nimcoh0 edited this page Dec 18, 2023
·
1 revision
step is single call to a method on the SUT or local help classes . several options are available :
get_Result : will retrieve the call method result
then : will run in async mode and let you define a Listener to method in the step flow
the step & the "then" command can run in three ways
regular - like any java method execute
BookStore bookStore = new Step.App_example_books_BookStore_addAllBooks(books).get_Result();
callback - use callback to retrieve the result
CallFuture<java.lang.String> future = new CallFuture<>();
new Step.App_example_books_BookStore_loopOverBooks().then(
Listener.app_example_books_Book_getTitle.waitToResult(),future);
async - use result Handler
new Step.App_example_books_BookStore_loopOverBooks().then(
Listener.app_example_books_Book_getTitle.waitToResult(),res ->{
Assert.assertTrue(res.result().equals("t1"));
});