コード例 #1
0
        [InlineData(5)]  // Relay
        public void WriteHighAndLow_Test(int pin)
        {
            var device = Majoro.Hello("Bilbo");
            var majoro = new Majoro(device.SerialPort);

            majoro.Connect();

            var count = Enumerable.Range(0, 50).Count(x => majoro.WriteHigh(pin) && majoro.WriteLow(pin));

            majoro.Disconnect();

            Assert.Equal(50, count);
        }
コード例 #2
0
        public void Ping_Test()
        {
            var device = Majoro.Hello("Bilbo");
            var majoro = new Majoro(device.SerialPort);

            majoro.Connect();

            var count = Enumerable.Range(0, 20).Count(x => majoro.Ping());

            majoro.Disconnect();

            Assert.Equal(20, count);
        }