public void PropertySetAppliesCorrectBitMask(byte bitMask) { var piface = new PiFaceDevice(new VirtualSpiDevice()); piface.SetOutputPinStates(bitMask); Assert.AreEqual(piface.GetOutputPinStates(), bitMask); }
public void PropertySetAppliesCorrectPinStates(byte bitMask, bool[] pinStates) { var piface = new PiFaceDevice(new VirtualSpiDevice()); piface.SetOutputPinStates(bitMask); for (var i = (byte)0; i < pinStates.Length; i++) { Assert.AreEqual(pinStates[i], piface.GetOutputPinState(i)); } }