1011121314151617181920
public class UnitsTest { @Test public void testDefault() { Units command = new Units(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("IN-DOTS"); output.printLn("PRINT");
2223242526272829303132
assertCommand(output, command); } @Test public void test() { Units command = new Units(UnitsType.centimeters); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! U"); output.printLn("IN-CENTIMETERS"); output.printLn("PRINT");
343536373839404142
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation() { Units command = new Units(null); command.getCommandByteArray(); }