910111213141516171819
public class SetTopOfFormTest { @Test public void test() { SetTopOfForm command = new SetTopOfForm(10); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("SET-TOF 10"); output.printLn("PRINT");
2122232425262728293031
assertCommand(output, command); } @Test public void testDefault() { SetTopOfForm command = new SetTopOfForm(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("SET-TOF 0"); output.printLn("PRINT");
323334353637383940
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation() { SetTopOfForm command = new SetTopOfForm(-1); command.getCommandByteArray(); }