Xceptance / neodymium-library

A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80 stars 11 forks source link

Refactor TestdataStatement #176

Open occupant23 opened 3 years ago

occupant23 commented 3 years ago

Is the empty constructor required for this class or can it be removed?

     public TestdataStatement()
     {
     }
oomelianchuk commented 3 years ago

This constructor, as well as a similar constructor for the ParameterStatement, is needed to be able to instantiate the class object in StatementBuilder.instantiate(Class<T> clazz) method. In turn, this is needed for real object instantiation via constructors with input parameters in the method TestdataStatement.createIterationData(TestClass testClass, FrameworkMethod method).

I agree, that this structure might be too complex but I could not come up with a simpler solution. Do you have some ideas? Otherwise, we should probably just add an explanation comment above both constructors.

occupant23 commented 3 years ago

@oomelianchuk: Thanks for the research. A comment would be much appreciated! Other questions: