예제 #1
0
            public void PropertySetAppliesCorrectBitMask(byte bitMask)
            {
                var piface = new PiFaceDevice(new VirtualSpiDevice());

                piface.SetOutputPinStates(bitMask);
                Assert.AreEqual(piface.GetOutputPinStates(), bitMask);
            }
예제 #2
0
            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));
                }
            }