Ejemplo n.º 1
0
        public void WhenNotChannelSet_ThenUniverseAreSentEmpty()
        {
            var dummyPort = new DummyPort();

            using (var sut = dummyPort.CreateController())
            {
                Thread.Sleep(250);
            }
            Assert.IsTrue(dummyPort.Received.Any(), "No output data");
            Assert.IsTrue(dummyPort.Received.All(x => x.Length == 0), "All universes should be empty");
        }
Ejemplo n.º 2
0
        public void WhenOneChannelIsSet_ThenUniverseAreSentWithRightLength()
        {
            var dummyPort = new DummyPort();

            using (var sut = dummyPort.CreateController())
            {
                sut[10] = 255;
                Thread.Sleep(250);
            }
            Assert.IsTrue(dummyPort.Received.Any(), "No output data");
            Assert.IsTrue(dummyPort.Received.Any(x => x.Length != 0), "At least one universe should be not empty");
            Assert.IsTrue(dummyPort.Received.Last().Length == 10, "The last universe sent should be 10 length");
        }