public void OperateStickFromStringTest() { var orignalOS = new OperateStick(StickID.LSTICK, (byte)98, (byte)76); var cw = new CommandWrapper(orignalOS.ToString()); Assert.IsTrue(cw.Command is OperateStick); var osFromString = (OperateStick)cw.Command; Assert.AreEqual(orignalOS.StickID, osFromString.StickID); Assert.AreEqual(orignalOS.TargetXAngle, osFromString.TargetXAngle); Assert.AreEqual(orignalOS.TargetYAngle, osFromString.TargetYAngle); }
public void ToStringTest() { var os = new OperateStick(StickID.LSTICK, 90, 180); Assert.AreEqual("LSTICK (90, 180)", os.ToString()); }