Skip to content

Instantly share code, notes, and snippets.

@aramkoukia
Created April 16, 2018 15:00
Show Gist options
  • Save aramkoukia/f9f0bb59f252c0ac67019526c939a28f to your computer and use it in GitHub Desktop.
Save aramkoukia/f9f0bb59f252c0ac67019526c939a28f to your computer and use it in GitHub Desktop.
Integration Test
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