public async Task Consumer() { var firstArticle = DataSeed.GetFirstArticle(); _mockProviderService .Given("Existing article id") .UponReceiving("Valid GET Article") .With(new ProviderServiceRequest { Method = HttpVerb.Get, Path = _path, }) .WillRespondWith(new ProviderServiceResponse { Status = (int)HttpStatusCode.OK, Headers = new Dictionary <string, object> { { "Content-Type", "application/json; charset=utf-8" } }, Body = firstArticle }); var result = await _consumerPactClassFixture.GetAsync(_path); Assert.Equal(HttpStatusCode.OK, result.StatusCode); JsonSerializer.Deserialize <Article>(await result.Content.ReadAsStringAsync()); }