@Test public void testErrorInPersistOnExit() { state.setMakeExceptionOnPersist(true); runBatchExpectNonZero(); assertEquals("Expecting empty output", getOutput(), makeTerminalExpectedMessage()); }
@Test public void testErrorOnInit() { state.setMakeExceptionOnInit(true); try { interpreter = new Shell<>(state); } catch (TerminalException exc) { assertThat( "Improper error message", exc.getMessage(), containsString("Spontanious exception")); } assertEquals( "Improper error output", getOutput(), makeTerminalExpectedMessage("Spontanious exception")); }