public void DifferentlySizedPortAndPacketArraysThrowsException()
        {
            var genericPinMock = new Mock<IOutputPort>();
            var bankZeroMock = new Mock<IOutputPort>();

            var layout = new PortLayout { LatchPort = genericPinMock.Object, ClockPort = genericPinMock.Object, DataPorts = new[] { bankZeroMock.Object } };
            var loggerMock = new Mock<ILogger>();
            var portManager = new PortManager(layout, loggerMock.Object);

            portManager.SendPacketArray(new[] { new CommandPacket(), new CommandPacket(), new CommandPacket() });
        }
        public void CreatingPortManagerPullsLatchPortLow()
        {
            var latchMock = new Mock<IOutputPort>(MockBehavior.Strict);
            latchMock.Setup(test => test.Write(false));

            var layout = new PortLayout {LatchPort = latchMock.Object};
            var loggerMock = new Mock<ILogger>();

            var portManager = new PortManager(layout, loggerMock.Object);

            latchMock.VerifyAll();
        }
        public void LatchPullsLatchOutputHighAndLow()
        {
            var latchMock = new Mock<IOutputPort>(MockBehavior.Strict);
            latchMock.Setup(test => test.Write(true));
            latchMock.Setup(test => test.Write(false));

            var layout = new PortLayout { LatchPort = latchMock.Object };
            var loggerMock = new Mock<ILogger>();

            var portManager = new PortManager(layout, loggerMock.Object);

            portManager.Latch();
        }