public void OperateButtonFromStringTest() { var orignalOB = new OperateButton(ButtonID.X, ButtonState.PRESS); var cw = new CommandWrapper(orignalOB.ToString()); Assert.IsTrue(cw.Command is OperateButton); var obFromString = (OperateButton)cw.Command; Assert.AreEqual(orignalOB.ButtonID, obFromString.ButtonID); Assert.AreEqual(orignalOB.TargetState, obFromString.TargetState); }
public void ToStringTest() { var ob = new OperateButton(ButtonID.A, ButtonState.PRESS); Assert.AreEqual("PRESS A", ob.ToString()); }