Andre Rodrigues
09/07/2022, 1:20 PMAndre Rodrigues
09/07/2022, 1:22 PMAndre Rodrigues
09/07/2022, 1:23 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Andre Rodrigues
09/07/2022, 1:52 PMAndre Rodrigues
09/07/2022, 1:55 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
And... in the last versions, did it work well? or not too?I don’t know when the regression appeared in Pact .NET sorry
Andre Rodrigues
09/08/2022, 8:43 AMAndre Rodrigues
09/08/2022, 8:56 AMAndre Rodrigues
09/08/2022, 9:05 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Andre Rodrigues
09/08/2022, 12:54 PMMatt (pactflow.io / pact-js / pact-go)
Andre Rodrigues
09/08/2022, 2:42 PMAndre Rodrigues
09/08/2022, 2:43 PMMatt (pactflow.io / pact-js / pact-go)
Andre Rodrigues
09/12/2022, 8:42 AMAndre Rodrigues
09/15/2022, 3:35 PMAndre Rodrigues
09/15/2022, 4:05 PM[Fact]
public async Task GetSomething_WhenTheTesterSomethingExists_ReturnsTheSomething()
{
// Arrange
this.pactBuilder
.UponReceiving("A GET request to retrieve the something")
.Given("There is a something with id 'tester'")
.WithRequest(HttpMethod.Get, "/somethings/tester")
.WithHeader("Accept", "application/json")
.WillRespond()
.WithStatus(HttpStatusCode.OK)
.WithHeader("Content-Type", "application/json; charset=utf-8")
.WithJsonBody(new
{
id = "tester",
firstName = "Totally",
lastName = "Awesome"
});
await this.pactBuilder.VerifyAsync(async ctx =>
{
// Act
var client = new SomethingApiClient(ctx.MockServerUri);
var something = await client.GetSomething("tester");
// Assert
Assert.Equal("tester", something.Id);
});
}