public void NeutralEndpointRecordLastReceivedSignal() { INeutralEndpoint neutral1 = new NeutralEndpoint(); Int32 receivedSignal = 0; neutral1.Receive += (sender, signal) => { receivedSignal = signal; }; neutral1.Transmit(1); Assert.AreEqual(neutral1.LastReceivedSignal, 1); neutral1.Transmit(0); Assert.AreEqual(neutral1.LastReceivedSignal, 0); INeutralEndpoint neutral2 = new NeutralEndpoint(); neutral2.Transmit(1); Assert.AreEqual(neutral2.LastReceivedSignal, 1); neutral2.Transmit(0); Assert.AreEqual(neutral2.LastReceivedSignal, 0); }
public void NeutralEndpointTransimit() { INeutralEndpoint newtral = new NeutralEndpoint(); Int32 receivedSignal = 0; newtral.Receive += (sender, signal) => { receivedSignal = signal; }; newtral.Transmit(1); Assert.AreEqual(receivedSignal, 1); }
public void NeutralTransmitInvalidSignal255() { INeutralEndpoint neutral = new NeutralEndpoint(); neutral.Transmit(255); }
public void NeutralEndpointTransimitWithoutHandler() { INeutralEndpoint neutral = new NeutralEndpoint(); neutral.Transmit(1); }