public async Task Given_a_string_lenght_service_must_get_number_characters(string pathService, string text, int expectedResult) { var msg = new Mensagem() { Text = text }; var result = await _client.PostAsync <int>(string.Concat(UrlHost, pathService), msg); Assert.That(result, Is.EqualTo(expectedResult)); }
public async Task Given_a_service_path_check_is_blocked_get_verb(string pathService) { //Arrange all var service = new ServicePath() { Path = pathService }; // Arrange Block Services await _client.PostAsync(string.Concat(UrlHost, "api/farfetch/v1/gateway/blockservice"), service); // Act var resultValue = await _client.GetAsync <object>(string.Concat(UrlHost, pathService)); // Assert Assert.IsTrue(resultValue.ToString().Contains("503 - Service Unavailable")); //Arrange UnblockService await _client.PostAsync(string.Concat(UrlHost, "api/farfetch/v1/gateway/unblockservice"), service); }