コード例 #1
0
        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);
        }
コード例 #2
0
        public void ToStringTest()
        {
            var ob = new OperateButton(ButtonID.A, ButtonState.PRESS);

            Assert.AreEqual("PRESS A", ob.ToString());
        }