public void GeneratedStubBarCallFails()
        {
            IRpcChannel          channel     = new RpcTestChannel();
            IRpcController       controller  = new RpcTestController();
            TestGenericService   service     = TestGenericService.CreateStub(channel);
            BarResponse          barResponse = null;
            Action <BarResponse> doneHandler = r => barResponse = r;

            service.Bar(controller, BarRequest.DefaultInstance, doneHandler);

            Assert.IsNull(barResponse);
            Assert.IsTrue(controller.Failed);
        }
        public void GeneratedStubFooCall()
        {
            IRpcChannel          channel     = new RpcTestChannel();
            IRpcController       controller  = new RpcTestController();
            TestGenericService   service     = TestGenericService.CreateStub(channel);
            FooResponse          fooResponse = null;
            Action <FooResponse> doneHandler = r => fooResponse = r;

            service.Foo(controller, FooRequest.DefaultInstance, doneHandler);

            Assert.IsNotNull(fooResponse);
            Assert.IsFalse(controller.Failed);
        }
Example #3
0
 public TestingController(TestGenericService service)
 {
     Service = service;
 }