|
1 | 1 | using System.Net;
|
2 |
| -using System.Text.Json; |
3 | 2 | using FluentAssertions;
|
4 | 3 | using JsonApiDotNetCore.Configuration;
|
5 | 4 | using JsonApiDotNetCore.Serialization.Objects;
|
@@ -238,11 +237,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
|
238 | 237 | responseDocument.Data.ManyValue[0].Id.Should().Be(planets[1].StringId);
|
239 | 238 | responseDocument.Data.ManyValue[1].Id.Should().Be(planets[3].StringId);
|
240 | 239 |
|
241 |
| - responseDocument.Meta.ShouldContainKey("total").With(value => |
242 |
| - { |
243 |
| - JsonElement element = value.Should().BeOfType<JsonElement>().Subject; |
244 |
| - element.GetInt32().Should().Be(2); |
245 |
| - }); |
| 240 | + responseDocument.Meta.Should().ContainTotal(2); |
246 | 241 |
|
247 | 242 | hitCounter.HitExtensibilityPoints.Should().BeEquivalentTo(new[]
|
248 | 243 | {
|
@@ -297,11 +292,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
|
297 | 292 | responseDocument.Data.ManyValue.ShouldHaveCount(1);
|
298 | 293 | responseDocument.Data.ManyValue[0].Id.Should().Be(planets[3].StringId);
|
299 | 294 |
|
300 |
| - responseDocument.Meta.ShouldContainKey("total").With(value => |
301 |
| - { |
302 |
| - JsonElement element = value.Should().BeOfType<JsonElement>().Subject; |
303 |
| - element.GetInt32().Should().Be(1); |
304 |
| - }); |
| 295 | + responseDocument.Meta.Should().ContainTotal(1); |
305 | 296 |
|
306 | 297 | hitCounter.HitExtensibilityPoints.Should().BeEquivalentTo(new[]
|
307 | 298 | {
|
@@ -349,11 +340,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
|
349 | 340 | responseDocument.Data.ManyValue[0].Id.Should().Be(star.Planets.ElementAt(1).StringId);
|
350 | 341 | responseDocument.Data.ManyValue[1].Id.Should().Be(star.Planets.ElementAt(3).StringId);
|
351 | 342 |
|
352 |
| - responseDocument.Meta.ShouldContainKey("total").With(value => |
353 |
| - { |
354 |
| - JsonElement element = value.Should().BeOfType<JsonElement>().Subject; |
355 |
| - element.GetInt32().Should().Be(2); |
356 |
| - }); |
| 343 | + responseDocument.Meta.Should().ContainTotal(2); |
357 | 344 |
|
358 | 345 | hitCounter.HitExtensibilityPoints.Should().BeEquivalentTo(new[]
|
359 | 346 | {
|
@@ -405,11 +392,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
|
405 | 392 | responseDocument.Data.ManyValue[0].Id.Should().Be(star.Planets.ElementAt(1).StringId);
|
406 | 393 | responseDocument.Data.ManyValue[1].Id.Should().Be(star.Planets.ElementAt(3).StringId);
|
407 | 394 |
|
408 |
| - responseDocument.Meta.ShouldContainKey("total").With(value => |
409 |
| - { |
410 |
| - JsonElement element = value.Should().BeOfType<JsonElement>().Subject; |
411 |
| - element.GetInt32().Should().Be(2); |
412 |
| - }); |
| 395 | + responseDocument.Meta.Should().ContainTotal(2); |
413 | 396 |
|
414 | 397 | hitCounter.HitExtensibilityPoints.Should().BeEquivalentTo(new[]
|
415 | 398 | {
|
|
0 commit comments