public async Task Given_a_service_path_check_is_unblocked_get_verb(string pathService, object expectedResult) { //Arrange all var service = new ServicePath() { Path = pathService }; // Arrange Block Services await _client.PostAsync(string.Concat(UrlHost, "api/farfetch/v1/gateway/unblockservice"), service); // Act var resultValue = await _client.GetAsync <object>(string.Concat(UrlHost, pathService)); // Assert Assert.That(resultValue, 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); }
public async Task Given_a_service_path_check_is_unblocked_post_verb(string pathService, string text, object expectedResult) { //Arrange all var service = new ServicePath() { Path = pathService }; var msg = new Mensagem() { Text = text }; // Arrange Block Services await _client.PostAsync(string.Concat(UrlHost, "api/farfetch/v1/gateway/unblockservice"), service); // Act var result = await _client.PostAsync <object>(string.Concat(UrlHost, pathService), msg); // Assert Assert.That(result, Is.EqualTo(expectedResult)); }