Created
April 16, 2018 15:00
-
-
Save aramkoukia/f9f0bb59f252c0ac67019526c939a28f to your computer and use it in GitHub Desktop.
Integration Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FluentAssertions; | |
using System.Threading.Tasks; | |
using Xunit; | |
namespace Product.CommandService.IntegrationTests | |
{ | |
public class PingControllerTests : IClassFixture<TestServerFixture> | |
{ | |
private readonly TestServerFixture _fixture; | |
public PingControllerTests(TestServerFixture fixture) | |
{ | |
_fixture = fixture; | |
} | |
[Fact] | |
public async Task PingControllerHappyPath() | |
{ | |
var response = await _fixture.Client.GetAsync("api/Ping"); | |
response.EnsureSuccessStatusCode(); | |
var responseStrong = await response.Content.ReadAsStringAsync(); | |
responseStrong.Should().Be("Ping"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment