Added unit tests for RuntimeEnvironment
This commit is contained in:
parent
b3ae5c9122
commit
ea57fc8bae
|
@ -77,4 +77,39 @@ public class RuntimeEnvironmentTester {
|
|||
assertEquals(errorManager, environment.getErrorManager());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assignOutputDecorator() {
|
||||
environment.setOutputDecorator(s -> "[" + s + "]");
|
||||
|
||||
assertEquals("[test]", environment.decorateOutput("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assignValueOutputDecorator() {
|
||||
environment.setValueOutputDecorator(s -> "(" + s + ")");
|
||||
|
||||
assertEquals("(test)", environment.decorateValueOutput("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assignWarningOutputDecorator() {
|
||||
environment.setWarningOutputDecorator(s -> "|" + s + "|");
|
||||
|
||||
assertEquals("|test|", environment.decorateWarningOutput("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assignErrorOutputDecorator() {
|
||||
environment.setErrorOutputDecorator(s -> "{" + s + "}");
|
||||
|
||||
assertEquals("{test}", environment.decorateErrorOutput("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assignCriticalOutputDecorator() {
|
||||
environment.setCriticalOutputDecorator(s -> "/" + s + "/");
|
||||
|
||||
assertEquals("/test/", environment.decorateCriticalOutput("test"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue