Ejemplo n.º 1
0
        public void TestProtobuf_Get()
        {
            using (var endpoint = new ProtobufServerInfo())
            {
                var client = endpoint.Provider.GetService <IFunction1Client>();

                string response = null;

                client.Function1_GET("Asp Client", Guid.NewGuid(), "Test",
                                     OKCallback: _ =>
                {
                    response = _;
                });


                Assert.Equal("Hello, Asp Client", response);
            }
        }
Ejemplo n.º 2
0
        public void TestProtobuf_Post()
        {
            using (var endpoint = new ProtobufServerInfo())
            {
                var client = endpoint.Provider.GetService <IFunction1Client>();

                string response = null;

                client.Function1_POST(new Contracts.User
                {
                    Name = "Asp Client"
                }, Guid.NewGuid(), "Test",
                                      OKCallback: _ =>
                {
                    response = _;
                });


                Assert.AreEqual("Hello, Asp Client", response);
            }
        }