示例#1
0
        public void Can_call_nested_service_with_ServiceClient()
        {
            var client = new JsonServiceClient(ListeningOn);

            var reqRoot = new Root {
                Id = 1
            };

            Assert.That(reqRoot.ToGetUrl(), Is.EqualTo("/root/1"));

            var reqNested = new Root.Nested {
                Id = 2
            };

            Assert.That(reqNested.ToGetUrl(), Is.EqualTo("/root.nested/2"));

            var root = client.Get(reqRoot);

            Assert.That(root.Id, Is.EqualTo(1));

            var nested = client.Get(reqNested);

            Assert.That(nested.Id, Is.EqualTo(2));
        }
示例#2
0
 public object Any(Root.Nested request)
 {
     return(request);
 }