1011121314151617181920
public class ContrastTest { @Test public void testNumber() { Contrast command = new Contrast(2); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("CONTRAST 2"); assertCommand(output, command);
2021222324252627282930
assertCommand(output, command); } @Test public void testEnum() { Contrast command = new Contrast(ContrastLevel.dark); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("CONTRAST 2"); assertCommand(output, command);
3031323334353637383940
assertCommand(output, command); } @Test public void testDefault() { Contrast command = new Contrast(); CommandOutputBuilder output = new CommandOutputBuilder(); output.printLn("CONTRAST 0"); assertCommand(output, command);
404142434445464748
assertCommand(output, command); } @Test(expected = ValidationException.class) public void testValidation1() { Contrast command = new Contrast(-1); command.getCommandByteArray(); }
474849505152535455
command.getCommandByteArray(); } @Test(expected = ValidationException.class) public void testValidation2() { Contrast command = new Contrast(4); command.getCommandByteArray(); }