예제 #1
0
        public void InvokeMethod_ShouldReturnCorrectStatus(string methodName, string payload, int expectedStatusCode)
        {
            deviceClient.SetMethodHandlerAsync("SetTelemetryInterval", DeviceAppModel.SetTelemetryInterval, null).Wait();
            var response = ServiceAppModel.InvokeMethod(serviceClient, "DeviceApp", methodName, payload).GetAwaiter();

            Assert.Equal(expectedStatusCode, response.GetResult().Status);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Task.Delay(5000).Wait();
            ServiceAppModel.InvokeMethod(serviceClient, "DeviceApp", "SetTelemetryInterval", "10").GetAwaiter();

            Console.ReadKey();
        }