@ -44,20 +44,45 @@ public class TestUnit<T extends TestContextInterface> implements Runnable {
add ( TestSuite . getDefault ( ) ) ;
add ( TestSuite . getDefault ( ) ) ;
}
}
//Shallow Copy
public TestUnit ( TestUnit < T > orig ) {
testUnitName = orig . testUnitName ;
ctx = orig . ctx ;
lambda = orig . lambda ;
result = orig . result ;
state = orig . state ;
lastException = orig . lastException ;
verboseMode = orig . verboseMode ;
testColor = orig . testColor ;
logFmtPadding = orig . logFmtPadding ;
logFmtMsgLen = orig . logFmtMsgLen ;
logFmtTestDuration = orig . logFmtTestDuration ;
lineWidthMin = orig . lineWidthMin ;
logFmtTestNameLen = orig . logFmtTestNameLen ;
logFmtCtxNameLen = orig . logFmtCtxNameLen ;
}
//Shallow Copy
public TestUnit < T > copy ( ) {
return new TestUnit < > ( this ) ;
}
public boolean isVerboseMode ( ) {
public boolean isVerboseMode ( ) {
return verboseMode ;
return verboseMode ;
}
}
public void setVerboseMode ( boolean verboseMode ) {
public TestUnit < T > setVerboseMode ( boolean verboseMode ) {
this . verboseMode = verboseMode ;
this . verboseMode = verboseMode ;
return this ;
}
}
public TermColor getTestColor ( ) {
public TermColor getTestColor ( ) {
return testColor ;
return testColor ;
}
}
public void setTestColor ( TermColor testColor ) {
public TestUnit < T > setTestColor ( TermColor testColor ) {
this . testColor = testColor ;
this . testColor = testColor ;
return this ;
}
}
public TestState getResult ( ) {
public TestState getResult ( ) {
@ -82,6 +107,11 @@ public class TestUnit<T extends TestContextInterface> implements Runnable {
return ctx ;
return ctx ;
}
}
public TestUnit < T > setContext ( T ctx ) {
this . ctx = ctx ;
return this ;
}
public void run ( ) {
public void run ( ) {
TestUtils . standardOutErrEnabled ( verboseMode ) ;
TestUtils . standardOutErrEnabled ( verboseMode ) ;
if ( ctx . isUninitializable ( ) ) {
if ( ctx . isUninitializable ( ) ) {