public void Platter_Operation() { var p = new Platter(new byte[] { 0xF0, 255, 255, 255 }); Assert.AreEqual((uint)15, p.OperatorNumber); var newP = p.SetRegisterA(3).SetRegisterB(6).SetRegisterC(2); Assert.AreEqual((uint)3, newP.RegisterA); Assert.AreEqual((uint)6, newP.RegisterB); Assert.AreEqual((uint)2, newP.RegisterC); Assert.AreEqual((uint)15, newP.OperatorNumber); newP = p.SetRegisterA(3).SetRegisterB(6).SetRegisterC(2).SetOperation(11); Assert.AreEqual((uint)3, newP.RegisterA); Assert.AreEqual((uint)6, newP.RegisterB); Assert.AreEqual((uint)2, newP.RegisterC); Assert.AreEqual((uint)11, newP.OperatorNumber); }
public void Platter_RegisterA() { Platter p = new Platter(new byte[] { 0, 0, 255, 255 }); Assert.AreEqual((uint)7, p.RegisterA); p = new Platter(new byte[] { 0, 0, 1, 0 }); Assert.AreEqual((uint)4, p.RegisterA); var newP = p.SetRegisterA(5); Assert.AreEqual((uint)5, newP.RegisterA); }