Skip to content

Commit

Permalink
docs: Update messaging pact docs to new API
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrodger committed Feb 15, 2024
1 parent ff481a7 commit 1fe517d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/messaging-pacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ types use two different names, for example "Stock Broker API" and "Stock Broker
Sample
------

See the [sample](../samples/Messaging/) for additional detail.
See the [sample](../samples/OrdersApi/) for additional detail.

Consumer Tests
--------------
Expand All @@ -26,24 +26,24 @@ In code, this is:
```csharp
public class StockEventProcessorTests
{
private readonly IMessagePactBuilderV3 messagePact;
private readonly IMessagePactBuilderV4 messagePact;

public StockEventProcessorTests(ITestOutputHelper output)
{
IPactV3 v3 = Pact.V3("Stock Event Consumer", "Stock Event Producer", new PactConfig
IPactV4 v4 = Pact.V4("Stock Event Consumer", "Stock Event Producer", new PactConfig
{
PactDir = "../../../pacts/",
DefaultJsonSettings = new JsonSerializerSettings
DefaultJsonSettings = new JsonSerializerOptions
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
},
Outputters = new[]
{
new XUnitOutput(output)
}
});

this.messagePact = v3.WithMessageInteractions();
this.messagePact = v4.WithMessageInteractions();
}

[Fact]
Expand Down

0 comments on commit 1fe517d

Please sign in to comment.