Updated Using WireMock in UnitTests (markdown)

Stef Heyenrath
2020-12-21 13:52:24 +01:00
parent 14d9f1e461
commit c3987c41af
+2 -2
@@ -1,6 +1,6 @@
# WireMock with your favorite UnitTest framework # WireMock with your favorite UnitTest framework
Obviously you can use your favourite test framework and use WireMock within your tests. In order to avoid flaky tests you should: Obviously you can use your favorite test framework and use WireMock.Net within your tests. In order to avoid flaky tests you should:
- let WireMock choose dynamicaly ports. It might seem common sens, avoid hard coded ports in your tests! - let WireMock.Net choose ports dynamically . It might seem common sense, avoid hard coded ports in your tests!
- clean up the request log or shutdown the server at the end of each test - 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: Below a simple example using Nunit and NFluent test assertion library: