Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor TestdataStatement #176

Open
occupant23 opened this issue Mar 25, 2021 · 2 comments
Open

Refactor TestdataStatement #176

occupant23 opened this issue Mar 25, 2021 · 2 comments

Comments

@occupant23
Copy link
Contributor

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

     public TestdataStatement()
     {
     }
@oomelianchuk
Copy link
Contributor

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
Copy link
Contributor Author

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

  • Should or do we need to set up some default values on instantiation?
  • Could we make this package protected if all needed classes would be located within the same package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants