Пример #1
0
        public void ExecutePutWithArguments(HttpVerb verb, string user, string password, string uri, string rota)
        {
            var result = FluentBuilder
                         .CreateNew()
                         .Authenticate(user, password)
                         .WithHeader("", "")
                         .AddUri(uri)
                         .AddRota(rota)
                         .SetVerb(verb)
                         .GetAsync <CommentMessageRequest, CommentMessageResponse>()
                         .Result;

            Assert.True(result.IsSuccessStatusCode);
            Assert.Equal(result.StatusCode, HttpStatusCode.OK);
        }
Пример #2
0
        public void ExecuteGet(HttpVerb verb, string uri, string rota)
        {
            var result = FluentBuilder
                         .CreateNew()
                         .Authenticate("usuario", "senha")
                         .WithHeader("", "")
                         .WithTimeout(1000)
                         .AddUri(uri)
                         .AddRota(rota)
                         .SetVerb(HttpVerb.Get)
                         .GetAsync <CommentMessageRequest, CommentMessageResponse>()
                         .Result;

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