public void CNCRMsgSetSpeedConstructorTest() { byte[] msgBytes = { 0x5C, 0x00, 0x2D, 0x05, 0x74 }; CNCRMsgSetSpeed target = new CNCRMsgSetSpeed(msgBytes); Assert.AreEqual(true, target.isX()); Assert.AreEqual(true, target.isY()); Assert.AreEqual(false, target.isZ()); Assert.AreEqual(300, target.getSpeed()); Assert.AreEqual(CNCRMSG_TYPE.SET_SPEED, target.getMessageType()); Assert.AreEqual(0x50, target.getMsgTypeByte()); }
public void CNCRMsgSetSpeedConstructorTest2() { bool X = false; bool Y = false; bool Z = false; ushort speed = 0; CNCRMsgSetSpeed target = new CNCRMsgSetSpeed(X, Y, Z, speed); Assert.AreEqual(X, target.isX()); Assert.AreEqual(Y, target.isY()); Assert.AreEqual(Z, target.isZ()); Assert.AreEqual(speed, target.getSpeed()); Assert.AreEqual(CNCRMSG_TYPE.SET_SPEED, target.getMessageType()); Assert.AreEqual(0x50, target.getMsgTypeByte()); }