mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-28 01:29:11 +02:00
x
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Moq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using WireMock.Handlers;
|
||||
using WireMock.Models;
|
||||
using WireMock.ResponseBuilders;
|
||||
@@ -69,9 +68,8 @@ public class ResponseWithHandlebarsXegerTests
|
||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, Mock.Of<HttpContext>(), request, _settings);
|
||||
|
||||
// Assert
|
||||
JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson);
|
||||
j["Number"].Value<int>().Should().BeGreaterThan(1000).And.BeLessThan(9999);
|
||||
j["Postcode"].Value<string>().Should().NotBeEmpty();
|
||||
var j = JObject.FromObject(response.Message.BodyData!.BodyAsJson!);
|
||||
j["Number"]?.Value<int>().Should().BeGreaterThan(1000).And.BeLessThan(9999);
|
||||
j["Postcode"]?.Value<string>().Should().NotBeEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user