910111213141516171819
public class SetFormFeedTest { @Test public void test() { SetFormFeed command = new SetFormFeed(1, 2); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("SETFF 1 2"); output.printLn("PRINT");
2122232425262728293031
assertCommand(output, command); } @Test public void testDefault() { SetFormFeed command = new SetFormFeed(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("SETFF 0 0"); output.printLn("PRINT");
333435363738394041
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation1() { SetFormFeed command = new SetFormFeed(-1, 0); command.getCommandByteArray(); }
404142434445464748
command.getCommandByteArray(); } @Test(expected = ValidationException.class) public void testValidation2() { SetFormFeed command = new SetFormFeed(0, -1); command.getCommandByteArray(); }