Beispiel #1
0
        protected async override Task RunTest()
        {
            var deviceEndpointTest = new ServiceEndpointLoad <DeviceModel>("Register Device", TestDevices, async(D) =>
            {
                return(await m_deviceServiceClient.RegisterDeviceAsync(D) != -1);
            });

            await deviceEndpointTest.Run();

            var scanEndpointTest = new ServiceEndpointLoad <ScanBatchModel>("Insert Scan", ScanBatches, async S =>
            {
                return(await m_scanServiceClient.InsertScanBatchAsync(S));
            });

            await scanEndpointTest.Run();
        }
        protected async override Task RunTest()
        {
            DeviceModel device = new DeviceModel()
            {
                Id = 1
            };
            var scanModels = m_scanGenerator.Run(device, m_wifiDevices, m_bluetoothDevices);

            Console.WriteLine("Scan Models {0}", scanModels.Count);

            var batchModels = ScanServiceClient.CreateScanBatchModels(scanModels, 5);
            ServiceEndpointLoad <ScanBatchModel> load = new ServiceEndpointLoad <ScanBatchModel>("Cluster Data", batchModels, SB =>
                                                                                                 m_scanServiceClient.InsertScanBatchAsync(SB));

            await load.Run();
        }