Package io.github.imagineDevit.giwt.core
Class ATestCase<T,R,STATE extends ATestCaseState<T>,RESULT extends ATestCaseResult<R>>
java.lang.Object
io.github.imagineDevit.giwt.core.CloseableCase
io.github.imagineDevit.giwt.core.ATestCase<T,R,STATE,RESULT>
- Type Parameters:
T-R-
public abstract class ATestCase<T,R,STATE extends ATestCaseState<T>,RESULT extends ATestCaseResult<R>>
extends CloseableCase
Test case abstract class.
- Since:
- 0.0.1
- Author:
- Henri Joel SEDJAME
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTest case result that can be either success or failure -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final TestParameters.Parameterprotected final TestCaseReport.TestReportprotected RESULTprotected STATE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedATestCase(String name, TestCaseReport.TestReport report, TestParameters.Parameter parameters) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAndGivenMsg(String message) protected voidaddAndThenMsg(String message) protected voidaddGivenMsg(String message) protected voidaddThenMsg(String message) protected voidaddWhenMsg(String message) protected StringgetName()Returns the name of the test case with its relevant parameters formatted.protected abstract voidrun()Methods inherited from class io.github.imagineDevit.giwt.core.CloseableCase
runIfOpen
-
Field Details
-
name
-
report
-
parameters
-
givenMsgs
-
whenMsgs
-
thenMsgs
-
state
-
result
-
-
Constructor Details
-
ATestCase
protected ATestCase(String name, TestCaseReport.TestReport report, TestParameters.Parameter parameters) Constructor- Parameters:
name- the testCase namereport- the test reportparameters- the test parameters
-
-
Method Details
-
getName
Returns the name of the test case with its relevant parameters formatted. If the test case has parameters, it will format the name using the parameters. If not, it will return the name as is. Note: This method is protected, which means it can only be accessed by classes within the same package or subclasses.- Returns:
- the formatted name of the test case.
-
addGivenMsg
-
addAndGivenMsg
-
addWhenMsg
-
addThenMsg
-
addAndThenMsg
-
run
protected abstract void run()
-