Ejemplo n.º 1
0
        public void HandlesArraysInQueryMap()
        {
            var requestInfo = new RequestInfo(HttpMethod.Get, null);

            requestInfo.AddQueryCollectionMap <string, string[], string>(QuerySerializationMethod.ToString, new Dictionary <string, string[]>()
            {
                { "foo", new[] { "bar", "baz" } },
            });
            var uri = this.requester.ConstructUri(null, "/foo", requestInfo);

            Assert.Equal(new Uri("http://api.example.com/base/foo?foo=bar&foo=baz"), uri);
        }
Ejemplo n.º 2
0
 public void HandlesArraysInQueryMap()
 {
     var requestInfo = new RequestInfo(HttpMethod.Get, null);
     requestInfo.AddQueryCollectionMap<string, string[], string>(QuerySerializationMethod.ToString, new Dictionary<string, string[]>()
     {
         { "foo", new[] { "bar", "baz" } },
     });
     var uri = this.requester.ConstructUri("/foo", requestInfo);
     Assert.Equal(new Uri("http://api.example.com/base/foo?foo=bar&foo=baz"), uri);
 }