Exemple #1
0
        internal async Task TestAllowedMessages(string aDeviceName, VorzeSA.CommandType aCommandType)
        {
            testUtil = new BluetoothDeviceTestUtils <VorzeSABluetoothInfo>();
            await testUtil.SetupTest(aDeviceName);

            if (aCommandType == VorzeSA.CommandType.Rotate)
            {
                testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
                {
                    { typeof(StopDeviceCmd), 0 },
                    { typeof(VorzeA10CycloneCmd), 0 },
                    { typeof(RotateCmd), 1 },
                });
            }
            else if (aCommandType == VorzeSA.CommandType.Vibrate)
            {
                testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
                {
                    { typeof(StopDeviceCmd), 0 },
                    { typeof(SingleMotorVibrateCmd), 0 },
                    { typeof(VibrateCmd), 1 },
                });
            }
            else
            {
                Assert.Fail("Unknown command type");
            }
        }
Exemple #2
0
 public void TestAllowedMessages()
 {
     testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
     {
         { typeof(StopDeviceCmd), 0 },
         { typeof(SingleMotorVibrateCmd), 0 },
         { typeof(VibrateCmd), 1 },
     });
 }
Exemple #3
0
 public void TestAllowedMessages()
 {
     testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
     {
         { typeof(StopDeviceCmd), 0 },
         { typeof(FleshlightLaunchFW12Cmd), 0 },
         { typeof(LinearCmd), 1 },
     });
 }
Exemple #4
0
 public void TestAllowedMessages()
 {
     foreach (var name in _deviceNames)
     {
         testUtil = new BluetoothDeviceTestUtils <VorzeSABluetoothInfo>();
         testUtil.SetupTest(name);
         testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
         {
             { typeof(StopDeviceCmd), 0 },
             { typeof(VorzeA10CycloneCmd), 0 },
             { typeof(RotateCmd), 1 },
         });
     }
 }
Exemple #5
0
 public void TestAllowedMessages()
 {
     foreach (var item in KiirooGen2Vibe.DevInfos)
     {
         var testUtil = new BluetoothDeviceTestUtils <KiirooGen2VibeBluetoothInfo>();
         testUtil.SetupTest(item.Key);
         testUtil.TestDeviceAllowedMessages(new Dictionary <System.Type, uint>()
         {
             { typeof(StopDeviceCmd), 0 },
             { typeof(SingleMotorVibrateCmd), 0 },
             { typeof(VibrateCmd), item.Value.VibeCount },
         });
     }
 }