Exemple #1
0
        public async Task ResetAsync()
        {
            byte[][] expected = { new byte[] { 0xfe, 0x01 } };

            await debug.ResetAsync();

            Assert.That(platform.GetCommands(), Is.EqualTo(expected));
            Assert.That(platform.nDisconnects, Is.EqualTo(1));
        }
        public async Task ResetRouteAsync()
        {
            byte[][] expected =
            {
                new byte[] { 0x09, 0x02, 0x01, 0x01, 0xff, 0x00, 0x06, 0x00, 0x01 },
                new byte[] { 0x0a, 0x02, 0x09, 0x03, 0x00, 0xfe, 0x01,0x00 },
                new byte[] { 0x0a, 0x03 }
            };

            await metawear.GetModule <ISwitch>().State.AddRouteAsync(source => source.Filter(Comparison.Eq, 1).React(token => debug.ResetAsync()));

            Assert.That(platform.nDisconnects, Is.EqualTo(0));
            Assert.That(platform.GetCommands(), Is.EqualTo(expected));
        }