91011121314151617
public class OnLowBatteryTest { @Test(expected = ValidationException.class) public void test1() { OnLowBattery command = new OnLowBattery(); command.getCommandByteArray(); }
1617181920212223242526
command.getCommandByteArray(); } @Test public void test2() { OnLowBattery command = new OnLowBattery(1); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("OLB ALARM 1"); output.printLn("PRINT");
2829303132333435363738
assertCommand(output, command); } @Test public void test3() { OnLowBattery command = new OnLowBattery("MESSAGE"); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("OLB ALERT \"MESSAGE\""); output.printLn("PRINT");
4041424344454647484950
assertCommand(output, command); } @Test public void test4() { OnLowBattery command = new OnLowBattery("MESSAGE", 1); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("OLB ALERT \"MESSAGE\" ALARM 1"); output.printLn("PRINT");
5253545556575859606162
assertCommand(output, command); } @Test public void test5() { OnLowBattery command = new OnLowBattery(null, 1); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("! UTILITIES"); output.printLn("OLB ALARM 1"); output.printLn("PRINT");
646566676869707172737475
assertCommand(output, command); } @Test public void testFake() { OnLowBattery command = new OnLowBattery(); command.setAlertMessage(""); command.setAlarmDuration(0); command.getAlertMessage(); command.getAlarmDuration(); command.toString(); }