コード例 #1
0
ファイル: IBeaconTest.cs プロジェクト: IlKaiser/MetaMotionC
        public async Task SetMajorFeedbackAsync()
        {
            byte[][] expected =
            {
                new byte[] { 0x09, 0x02, 0x01, 0x01, 0xff, 0x00, 0x02, 0x13 },
                new byte[] { 0x0a, 0x02, 0x09, 0x03, 0x00, 0x07, 0x03,0x02, 0x09, 0x00 },
                new byte[] { 0x0a, 0x03, 0x00,0x00 },
                new byte[] { 0x07, 0x01, 0x01 }
            };

            var iswitch = metawear.GetModule <ISwitch>();
            await iswitch.State.AddRouteAsync(source => source.Count().React(token => ibeacon.Configure(majorToken: token)));

            ibeacon.Enable();

            Assert.That(platform.GetCommands(), Is.EqualTo(expected));
        }
コード例 #2
0
        public void SetMinor()
        {
            byte[][] expected =
            {
                new byte[] { 0x07, 0x04, 0x1d, 0x1d }
            };

            ibeacon.Configure(minor: 7453);
            Assert.That(platform.GetCommands(), Is.EqualTo(expected));
        }