public void NoAwait() { var r = new ClassRootClient(); var service = new FakeService(0); service.CallAsync(() => r.Simple()); Thread.Sleep(50); Assert.AreEqual(0, service.CallCount); }
public async Task MultipleAwaits() { var r = new ClassRootClient(); var service = new FakeService(2); var p = service.CallAsync(() => r.Simple()); await p; await p; Assert.AreEqual(2, service.CallCount); }
public async Task SimpleOnClass() { ClassRootClient r = new ClassRootClient(); var service = new FakeService(); await service.CallAsync(() => r.Simple()); }
public async Task SimpleOnServiceInterface() { var r = new ClassRootClient(); IRpcServiceAsync service = new FakeService(); await service.CallAsync(() => r.Simple()); }