Skip to content

Commit 8354e60

Browse files
committed
Unit test
1 parent 1be9c34 commit 8354e60

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

FakeApiTest/FakeHttpRequesterTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ namespace FakeApiTest
1111
public class FakeHttpRequesterTests
1212
{
1313
[TestMethod]
14-
public void ShouldMockPropertiesFromDefaultConfig()
14+
[DataRow(true)]
15+
[DataRow(false)]
16+
public void ShouldMockPropertiesFromDefaultConfig(bool runAsync)
1517
{
1618
//Arrange
1719
var filePath = "apisConfig.json";
@@ -63,7 +65,7 @@ public void ShouldMockPropertiesFromDefaultConfig()
6365
var webRequest = (HttpWebRequest)WebRequest.Create("http://localhost/api/products/2/something");
6466

6567
//Act
66-
var response = requester.GetResponse(webRequest);
68+
var response = runAsync ? requester.GetResponseAsync(webRequest).Result : requester.GetResponse(webRequest);
6769

6870
//Assert
6971
Assert.AreEqual(config.DefaultContentType, response.ContentType);

0 commit comments

Comments
 (0)