public void InputEndpointRecordLastReceivedSignal() { IInputEndpoint input1 = new InputEndpoint(); Int32 receivedSignal = 0; input1.Receive += (sender, signal) => { receivedSignal = signal; }; input1.Transmit(1); Assert.AreEqual(input1.LastReceivedSignal, 1); input1.Transmit(0); Assert.AreEqual(input1.LastReceivedSignal, 0); IInputEndpoint input2 = new InputEndpoint(); input2.Transmit(1); Assert.AreEqual(input2.LastReceivedSignal, 1); input2.Transmit(0); Assert.AreEqual(input2.LastReceivedSignal, 0); }
public void InputEndpointTransimit() { IInputEndpoint input1 = new InputEndpoint(); Int32 receivedSignal = 0; input1.Receive += (sender, signal) => { receivedSignal = signal; }; input1.Transmit(1); Assert.AreEqual(receivedSignal, 1); }
public void InputTransmitInvalidSignal255() { IInputEndpoint input1 = new InputEndpoint(); input1.Transmit(255); }
public void InputEndpointTransimitWithoutHandler() { IInputEndpoint input1 = new InputEndpoint(); input1.Transmit(1); }