Exemplo n.º 1
0
 public void NoAwait()
 {
     var r = new ClassRootClient();
     var service = new FakeService(0);
     service.CallAsync(() => r.Simple());
     Thread.Sleep(50);
     Assert.AreEqual(0, service.CallCount);
 }
Exemplo n.º 2
0
        public void NoAwait()
        {
            var r       = new ClassRootClient();
            var service = new FakeService(0);

            service.CallAsync(() => r.Simple());
            Thread.Sleep(50);
            Assert.AreEqual(0, service.CallCount);
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public async Task SimpleOnClass()
 {
     ClassRootClient r = new ClassRootClient();
     var service = new FakeService();
     await service.CallAsync(() => r.Simple());
 }
Exemplo n.º 6
0
 public async Task SimpleOnServiceInterface()
 {
     var r = new ClassRootClient();
     IRpcServiceAsync service = new FakeService();
     await service.CallAsync(() => r.Simple());
 }
Exemplo n.º 7
0
 public async Task SimpleOnClass()
 {
     ClassRootClient r       = new ClassRootClient();
     var             service = new FakeService();
     await service.CallAsync(() => r.Simple());
 }
Exemplo n.º 8
0
 public async Task SimpleOnServiceInterface()
 {
     var r = new ClassRootClient();
     IRpcServiceAsync service = new FakeService();
     await service.CallAsync(() => r.Simple());
 }