Example #1
0
        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);
        }
Example #2
0
        public void NeutralEndpointTransimit()
        {
            INeutralEndpoint newtral        = new NeutralEndpoint();
            Int32            receivedSignal = 0;

            newtral.Receive += (sender, signal) =>
            {
                receivedSignal = signal;
            };
            newtral.Transmit(1);

            Assert.AreEqual(receivedSignal, 1);
        }
Example #3
0
        public void NeutralTransmitInvalidSignal255()
        {
            INeutralEndpoint neutral = new NeutralEndpoint();

            neutral.Transmit(255);
        }
Example #4
0
        public void NeutralEndpointTransimitWithoutHandler()
        {
            INeutralEndpoint neutral = new NeutralEndpoint();

            neutral.Transmit(1);
        }