Package com.willwinder.universalgcodesender.mockobjects

Examples of com.willwinder.universalgcodesender.mockobjects.MockConnection.sendResponse()


        String output = mg.readStringFromGrblBuffer();
        assertEquals(thirtyNineCharString+"\n"+thirtyNineCharString+"\n"+thirtyNineCharString+"\n",
                        output);
       
        // Make room for the next command.
        mc.sendResponse("ok");
       
        // Send it.
        instance.streamCommands();
       
        // Make sure the queued command was sent.
View Full Code Here


        // Make sure the queued command was sent.
        output = mg.readStringFromGrblBuffer();
        assertEquals(thirtyNineCharString+"\n", output);
 
        // Wrap up.
        mc.sendResponse("ok");
        mc.sendResponse("ok");
        mc.sendResponse("ok");

        expResult = false;
        result = instance.areActiveCommands();
View Full Code Here

        output = mg.readStringFromGrblBuffer();
        assertEquals(thirtyNineCharString+"\n", output);
 
        // Wrap up.
        mc.sendResponse("ok");
        mc.sendResponse("ok");
        mc.sendResponse("ok");

        expResult = false;
        result = instance.areActiveCommands();
        assertEquals(expResult, result);
View Full Code Here

        assertEquals(thirtyNineCharString+"\n", output);
 
        // Wrap up.
        mc.sendResponse("ok");
        mc.sendResponse("ok");
        mc.sendResponse("ok");

        expResult = false;
        result = instance.areActiveCommands();
        assertEquals(expResult, result);
    }
View Full Code Here

        expectedInt = GrblUtils.GRBL_RX_BUFFER_SIZE / (twentyCharString.length()+1);
        assertEquals(expectedInt, arr.length);

        // Process 'ok' messages.
        for (int i=0; i <arr.length; i++) {
            mc.sendResponse("ok");
        }

        // Make sure we don't stream anymore.
        instance.streamCommands();
        grblReceiveString = mg.readStringFromGrblBuffer();
View Full Code Here

        expectedInt = GrblUtils.GRBL_RX_BUFFER_SIZE / (twentyCharString.length()+1);
        assertEquals(expectedInt, arr.length);

        // Wrap up the active commands.
        for (int i=0; i <arr.length; i++) {
            mc.sendResponse("ok");
        }
           
        // Make sure canceled commands are not sent.
        instance.streamCommands();
        grblReceiveString = mg.readStringFromGrblBuffer();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.