diff --git a/Using-WireMock-in-UnitTests.md b/Using-WireMock-in-UnitTests.md index 8573540..20f9e9e 100644 --- a/Using-WireMock-in-UnitTests.md +++ b/Using-WireMock-in-UnitTests.md @@ -4,7 +4,7 @@ Obviously you can use your favourite test framework and use WireMock within your - clean up the request log or shutdown the server at the end of each test Below a simple example using Nunit and NFluent test assertion library: -```csharp +```cs [SetUp] public void StartMockServer() { @@ -18,7 +18,7 @@ public async void Should_respond_to_request() _sut = new SomeComponentDoingHttpCalls(); _server - .Given(Request.Create().WithUrl("/foo").UsingGet()) + .Given(Request.Create().WithPath("/foo").UsingGet()) .RespondWith( Response.Create() .WithStatusCode(200) @@ -30,9 +30,6 @@ public async void Should_respond_to_request() // then Check.That(response).IsEqualTo(EXPECTED_RESULT); - - // and optionally - Check.That(_server.FindLogEntries(Request.WithUrl("/error*")).IsEmpty(); } [TearDown]