Exemplo n.º 1
0
        public void CNCRMsgCmdAckConstructorTest1()
        {
            byte[]        msgBytes = { 0x12, 0xFF, 0xED };
            CNCRMsgCmdAck target   = new CNCRMsgCmdAck(msgBytes);

            Assert.AreEqual(true, target.getError());
            Assert.AreEqual(127, target.getFirmware());
        }
Exemplo n.º 2
0
        public void getErrorTest()
        {
            CNCRMsgCmdAck target   = new CNCRMsgCmdAck(true, 127); // TODO: Initialize to an appropriate value
            bool          expected = true;                         // TODO: Initialize to an appropriate value
            bool          actual;

            actual = target.getError();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void getFirmwareTest()
        {
            CNCRMsgCmdAck target   = new CNCRMsgCmdAck(true, 127); // TODO: Initialize to an appropriate value
            byte          expected = 127;                          // TODO: Initialize to an appropriate value
            byte          actual;

            actual = target.getFirmware();
            Assert.AreEqual <byte>(expected, actual);
        }
Exemplo n.º 4
0
        public void CNCRMsgCmdAckConstructorTest_ErrBadFW()
        {
            bool          isError  = true;
            byte          firmware = 128;
            CNCRMsgCmdAck target   = new CNCRMsgCmdAck(isError, firmware);

            Assert.AreEqual(isError, target.getError());
            Assert.AreEqual(firmware, target.getFirmware());
        }
Exemplo n.º 5
0
        public void CNCRMsgCmdAckConstructorTest_valid()
        {
            bool          isError  = false;
            byte          firmware = 0;
            CNCRMsgCmdAck target   = new CNCRMsgCmdAck(isError, firmware);

            Assert.AreEqual(isError, target.getError());
            Assert.AreEqual(firmware, target.getFirmware());
        }
Exemplo n.º 6
0
        public void toSerialTest()
        {
            CNCRMsgCmdAck target = new CNCRMsgCmdAck(true, 127);

            byte[] expected = { 0x12, 0xFF, 0xED };
            byte[] actual;
            actual = target.toSerial();
            for (int i = 0; i < expected.Length; i++)
            {
                Assert.AreEqual <byte>(expected[i], actual[i]);
            }
        }