Problem
We have a duplication problem that is generated by the repeated validations/preconditions we need to run on all the user input (suites, tests, assertions) before running a test suite or even considering it a valid one.
Proposed solution
Introduce the precondition object that is responsible for doing something like:
if(conditionIsNotMet) {
throw new PreconditionError(errorMessage)
}
condition and error message must be provided by the user
Problem
We have a duplication problem that is generated by the repeated validations/preconditions we need to run on all the user input (suites, tests, assertions) before running a test suite or even considering it a valid one.
Proposed solution
Introduce the precondition object that is responsible for doing something like:
condition and error message must be provided by the user