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); }
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); }