use of com.willwinder.universalgcodesender.AbstractController.UnexpectedCommand in project Universal-G-Code-Sender by winder.
the class GrblControllerTest method testCommandComplete.
/**
* Test of commandComplete method, of class GrblController.
*/
@Test
public void testCommandComplete() {
System.out.println("commandComplete");
GcodeCommand command = null;
GrblController instance = new GrblController(mgc);
// Test 1. Complete a command that was marked as sent but never declared
// within commandSent(command).
command = new GcodeCommand("blah");
command.setSent(true);
boolean hitException = false;
try {
instance.commandComplete(command.getCommandString());
} catch (UnexpectedCommand ex) {
hitException = true;
}
assertEquals(true, hitException);
// TODO: Test that command complete triggers a listener event.
// TODO: Test that command complete triggers fileStreamComplete.
}
Aggregations