WaitConditionBuilder constructor never sets the condition in the builder despite taking it as an argument
See original GitHub issueCitrus Version 3.2.1
Expected behavior The constructor should set the condition in the underlying builder.
Actual behavior The constructor does not set the condition in the underlying builder, it has to be set manually.
Test case sample
Wait.Builder builder = new Wait.Builder()
.time(timeout);
WaitActionConditionBuilder waitActionConditionBuilder = new WaitActionConditionBuilder(condition, builder);
does not work. The condition
will never actually be set. Instead,
Wait.Builder builder = new Wait.Builder()
.time(timeout)
.condition(condition);
WaitActionConditionBuilder waitActionConditionBuilder = new WaitActionConditionBuilder(condition, waitBuilder);
has to be performed. This makes the argument condition
in the WaitActionConditionBuilder
useless.
I’d propose to add a line builder.condition(condition)
in the constructor of WaitConditionBuilder
.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Good First Issue on Twitter: "an issue just got labeled ...
WaitConditionBuilder constructor never sets the condition in the builder despite ... The constructor should set the condition in the underlying builder.
Read more >Why is Lombok @Builder not compatible with this constructor?
@wdc I have only one constructors (which is mentioned in the code). I need constructor with this parameter to be able to copy...
Read more >Constructor with tons of parameters vs builder pattern
The Builder Pattern does not solve the “problem” of many arguments. But why are many arguments problematic? They indicate your class might ...
Read more >Item 2: Consider a builder when faced with many constructor ...
When you want to create an instance, you use the constructor with the shortest parameter list containing all the parameters you want to...
Read more >Framework for automated integration tests with focus on ...
WaitConditionBuilder constructor never sets the condition in the builder despite taking it as an argument ; Citrus Version 3.2.1 ; Expected ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@akuz0 just follow the steps proposed. make the constructor argument meaningful. test it using the code proposed (“assert condition is applied in constructor”).
@bbortt @akuz0 please have a look #875