use of de.prob.animator.command.CheckBooleanPropertyCommand in project prob2 by bendisposto.
the class CheckBooleanPropertyCommandTest method testProcessIllegalResult.
@Test(expected = ResultParserException.class)
public void testProcessIllegalResult() {
ISimplifiedROMap<String, PrologTerm> map = TestHelper.mkAtomMock("PropResult", "fff");
CheckBooleanPropertyCommand cmd = new CheckBooleanPropertyCommand("BLAH_BLAH", "root");
cmd.processResult(map);
}
use of de.prob.animator.command.CheckBooleanPropertyCommand in project prob2 by bendisposto.
the class CheckBooleanPropertyCommandTest method testProcessResultTrue.
@Test
public void testProcessResultTrue() {
ISimplifiedROMap<String, PrologTerm> map = TestHelper.mkAtomMock("PropResult", "true");
CheckBooleanPropertyCommand cmd = new CheckBooleanPropertyCommand("BLAH_BLAH", "root");
cmd.processResult(map);
assertTrue(cmd.getResult());
}
use of de.prob.animator.command.CheckBooleanPropertyCommand in project prob2 by bendisposto.
the class CheckBooleanPropertyCommandTest method testWriteCommand.
@Test
public void testWriteCommand() {
CheckBooleanPropertyCommand cmd = new CheckBooleanPropertyCommand("A_DINGO_ATE_MY_BABY", "root");
IPrologTermOutput pto = mock(IPrologTermOutput.class);
cmd.writeCommand(pto);
verify(pto).openTerm("state_property");
verify(pto).printVariable(anyString());
verify(pto).printAtomOrNumber("root");
verify(pto).printAtom("A_DINGO_ATE_MY_BABY");
}
use of de.prob.animator.command.CheckBooleanPropertyCommand in project prob2 by bendisposto.
the class CheckBooleanPropertyCommandTest method testProcessResultFalse.
@Test
public void testProcessResultFalse() {
ISimplifiedROMap<String, PrologTerm> map = TestHelper.mkAtomMock("PropResult", "false");
CheckBooleanPropertyCommand cmd = new CheckBooleanPropertyCommand("BLAH_BLAH", "root");
cmd.processResult(map);
assertFalse(cmd.getResult());
}
use of de.prob.animator.command.CheckBooleanPropertyCommand in project prob2 by bendisposto.
the class CheckBooleanPropertyCommandTest method testProcessResultNull.
@Test(expected = IllegalStateException.class)
public void testProcessResultNull() {
CheckBooleanPropertyCommand cmd = new CheckBooleanPropertyCommand("BLAH_BLAH", "root");
cmd.getResult();
}
Aggregations