public void Calculate_SetsWireOutToFalse_ForWireInIsTrue()
        {
            // Arrange
            Inverter sut = CreateSut(m_WireIn,
                                     m_WireOut);

            m_WireIn.SetSignal(TimeDoesNotMatter,
                               true);

            // Act
            sut.Calculate(0);

            // Assert
            m_WireOut.GetSignal().ShouldBeFalse();
        }
Example #2
0
        public void Calculate(int time)
        {
            bool value = m_WireInOne.GetSignal() ||
                         m_WireInTwo.GetSignal();

            m_WireOut.SetSignal(time,
                                value);
        }
        public void WhenTheSignalOnTheWireIs([NotNull] string wireName,
                                             bool value,
                                             int time)
        {
            IWire wire = GetWireFromContext(wireName);

            wire.SetSignal(time,
                           value);
        }
Example #4
0
 public void Calculate(int time)
 {
     m_WireOut.SetSignal(time,
                         !m_WireIn.GetSignal());
 }