Example #1
0
        public void ShouldBuildUriQuery()
        {
            _arguments = new Dictionary <string, string>
            {
                { "arg1", "value1" },
                { "arg2", "value2" }
            };

            _uriQueryBuilder.Build(_arguments).Should().Be.EqualTo("arg1=value1&arg2=value2");
        }
Example #2
0
        public string For(Request request)
        {
            var uriQuery = _uriQueryBuilder.Build(request.Arguments);

            var uriQueryWithStartIndex =
                String.Format(
                    "{0}{1}",
                    uriQuery,
                    CreateQueryStringForStartIndex(request));

            return(String.Format(
                       "{0}{1}{2}",
                       _configurationWrapper.ValueFor(BaseUriKey),
                       request.UriPath,
                       uriQueryWithStartIndex != String.Empty
                    ? String.Format("?{0}", uriQueryWithStartIndex)
                    : String.Empty));
        }