mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-26 17:59:20 +02:00
Updated Using WireMock in UnitTests (markdown)
@@ -14,7 +14,7 @@ public void StartMockServer()
|
|||||||
[Test]
|
[Test]
|
||||||
public async void Should_respond_to_request()
|
public async void Should_respond_to_request()
|
||||||
{
|
{
|
||||||
// given
|
// Assign
|
||||||
_sut = new SomeComponentDoingHttpCalls();
|
_sut = new SomeComponentDoingHttpCalls();
|
||||||
|
|
||||||
_server
|
_server
|
||||||
@@ -25,10 +25,10 @@ public async void Should_respond_to_request()
|
|||||||
.WithBody(@"{ ""msg"": ""Hello world!"" }")
|
.WithBody(@"{ ""msg"": ""Hello world!"" }")
|
||||||
);
|
);
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var response = _sut.DoSomething();
|
var response = _sut.DoSomething();
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
Check.That(response).IsEqualTo(EXPECTED_RESULT);
|
Check.That(response).IsEqualTo(EXPECTED_RESULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user