1011121314151617181920
public class BaudTest { @Test public void testDefault() { Baud command = new Baud(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("BAUD 115200"); output.printLn("PRINT");
2223242526272829303132
assertCommand(output, command); } @Test public void testString() { Baud command = new Baud("1234"); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("BAUD 1234"); output.printLn("PRINT");
3435363738394041424344
assertCommand(output, command); } @Test public void testEnum() { Baud command = new Baud(BaudRate.bauds_19200); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("BAUD 19200"); output.printLn("PRINT");
464748495051525354
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation() { Baud command = new Baud(""); command.getCommandByteArray(); }
5354555657585960616263
command.getCommandByteArray(); } @Test public void testFake() { Baud command = new Baud(); command.setBaudRate(BaudRate.bauds_115200); command.setBaudRate(""); command.getBaudRate(); command.toString(); }