Ejemplo n.º 1
0
        public void getXTest()
        {
            CNCRMsgMove target   = new CNCRMsgMove(-32768, 32767, 24155);
            short       expected = -32768;
            short       actual;

            actual = target.getX();
            Assert.AreEqual <short>(expected, actual);
        }
Ejemplo n.º 2
0
        public void CNCRMsgMoveConstructorTest1()
        {
            byte[]      msgBytes = { 0x60, 0x81, 0x00, 0x00, 0x7E, 0xFF, 0x06, 0x5F, 0x5A, 0x03, 0x60 };
            CNCRMsgMove target   = new CNCRMsgMove(msgBytes);

            Assert.AreEqual <CNCRMSG_TYPE>(CNCRMSG_TYPE.MOVE, target.getMessageType());
            Assert.AreEqual <byte>(0x60, target.getMsgTypeByte());
            Assert.AreEqual <short>(-32768, target.getX());
            Assert.AreEqual <short>(32767, target.getY());
            Assert.AreEqual <short>(24155, target.getZ());
        }
Ejemplo n.º 3
0
        public void CNCRMsgMoveConstructorTest()
        {
            //-32768, 32767, 24155
            short       X      = -32768; // TODO: Initialize to an appropriate value
            short       Y      = 32767;  // TODO: Initialize to an appropriate value
            short       Z      = 24155;  // TODO: Initialize to an appropriate value
            CNCRMsgMove target = new CNCRMsgMove(X, Y, Z);

            Assert.AreEqual <CNCRMSG_TYPE>(CNCRMSG_TYPE.MOVE, target.getMessageType());
            Assert.AreEqual <byte>(0x60, target.getMsgTypeByte());
            Assert.AreEqual <short>(-32768, target.getX());
            Assert.AreEqual <short>(32767, target.getY());
            Assert.AreEqual <short>(24155, target.getZ());
        }