89101112131415161718
import org.junit.Test; public class SpeedTest { public void testDefault() { Speed command = new Speed(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("SPEED 0"); assertCommand(output, command);
1819202122232425262728
assertCommand(output, command); } @Test public void test() { Speed command = new Speed(1); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("SPEED 1"); assertCommand(output, command);
282930313233343536
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation() { Speed command = new Speed(6); command.getCommandByteArray(); }