public static void SerializeTest() { var target = new ControlStandardKeySet(0x30); var clone = DeepCloner.DeepClone(target); Assert.IsTrue(clone.Equals(target)); }
public static void CreateTest(bool[] answers, byte b) { var instance = new ControlStandardKeySet(b); Assert.AreEqual(instance.Ok, answers[0]); Assert.AreEqual(instance.Cancel, answers[1]); Assert.AreEqual(instance.Sub, answers[2]); Assert.AreEqual(instance.Down, answers[3]); Assert.AreEqual(instance.Left, answers[4]); Assert.AreEqual(instance.Right, answers[5]); Assert.AreEqual(instance.Up, answers[6]); }
public static void ToByteTest(bool[] flags, byte answer) { var instance = new ControlStandardKeySet { Ok = flags[0], Cancel = flags[1], Sub = flags[2], Down = flags[3], Left = flags[4], Right = flags[5], Up = flags[6] }; Assert.AreEqual(instance.ToByte(), answer); }