public async Task ValidateLroWrapper() { ManagementTestClient client = InstrumentClient(new ManagementTestClient()); TestResource rgOp = client.GetTestResource(); TestResource testResource = await rgOp.LroWrapperAsync(); Assert.AreEqual("TestResourceProxy", testResource.GetType().Name); Assert.AreEqual("success", testResource.Method()); }
public async Task ValidateSkipWait() { ManagementTestClient client = InstrumentClient(new ManagementTestClient()); TestResource rgOp = client.GetTestResource(); Stopwatch timer = Stopwatch.StartNew(); TestResource testResource = await rgOp.LroWrapperAsync(); timer.Stop(); //method waits for 10 seconds so timer should easily be less than half of that if we skip Assert.IsTrue(timer.ElapsedMilliseconds < 5000, $"WaitForCompletion took {timer.ElapsedMilliseconds}ms"); }