Пример #1
0
        public void ExecuteGetWithArguments(HttpVerb verb, string uri, string rota, string parameter)
        {
            var result = FluentBuilder
                         .CreateNewList()
                         .Authenticate("usuario", "senha")
                         .WithHeader("MerchantKey", "7b379c45-57d6-4508-ae56-29bb0b3c9741")
                         .WithTimeout(1000)
                         .WithArguments(x => ParameterQueryString.Factor.Create("nome", "1"))
                         .AddUri(uri)
                         .AddRota(rota)
                         .SetVerb(HttpVerb.Get)
                         .GetAsync <CommentMessageRequest, CommentMessageResponse>()
                         .Result;

            Assert.True(result.IsSuccessStatusCode);
            Assert.Equal(result.StatusCode, HttpStatusCode.OK);
        }