Skip to content

Commit a2c50e4

Browse files
authoredFeb 16, 2023
Merge branch 'master' into fix-secondary-reverse-filter
2 parents 9f31f92 + 0adebfd commit a2c50e4

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed
 

‎test/JsonApiDotNetCoreTests/IntegrationTests/Meta/TopLevelCountTests.cs

-4
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
5454
// Assert
5555
httpResponse.ShouldHaveStatusCode(HttpStatusCode.OK);
5656

57-
responseDocument.Meta.ShouldNotBeNull();
58-
5957
responseDocument.Meta.ShouldContainKey("total").With(value =>
6058
{
6159
JsonElement element = value.Should().BeOfType<JsonElement>().Subject;
@@ -110,8 +108,6 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
110108
// Assert
111109
httpResponse.ShouldHaveStatusCode(HttpStatusCode.OK);
112110

113-
responseDocument.Meta.ShouldNotBeNull();
114-
115111
responseDocument.Meta.ShouldContainKey("total").With(value =>
116112
{
117113
JsonElement element = value.Should().BeOfType<JsonElement>().Subject;

‎test/JsonApiDotNetCoreTests/IntegrationTests/ResourceInheritance/ResourceInheritanceReadTests.cs

+6-18
Original file line numberDiff line numberDiff line change
@@ -614,19 +614,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
614614
resource.Links.ShouldNotBeNull();
615615
resource.Links.Self.Should().Be($"/chromeWheels/{resource.Id}");
616616

617-
resource.Attributes.ShouldHaveCount(2);
618-
resource.Attributes.ShouldContainKey("radius");
619-
resource.Attributes.ShouldContainKey("paintColor");
617+
resource.Attributes.ShouldOnlyContainKeys("radius", "paintColor");
620618
}
621619

622620
foreach (ResourceObject resource in responseDocument.Data.ManyValue.Where(value => value.Type == "carbonWheels"))
623621
{
624622
resource.Links.ShouldNotBeNull();
625623
resource.Links.Self.Should().Be($"/carbonWheels/{resource.Id}");
626624

627-
resource.Attributes.ShouldHaveCount(2);
628-
resource.Attributes.ShouldContainKey("radius");
629-
resource.Attributes.ShouldContainKey("hasTube");
625+
resource.Attributes.ShouldOnlyContainKeys("radius", "hasTube");
630626
}
631627

632628
foreach (ResourceObject resource in responseDocument.Data.ManyValue)
@@ -686,19 +682,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
686682
resource.Links.ShouldNotBeNull();
687683
resource.Links.Self.Should().Be($"/chromeWheels/{resource.Id}");
688684

689-
resource.Attributes.ShouldHaveCount(2);
690-
resource.Attributes.ShouldContainKey("radius");
691-
resource.Attributes.ShouldContainKey("paintColor");
685+
resource.Attributes.ShouldOnlyContainKeys("radius", "paintColor");
692686
}
693687

694688
foreach (ResourceObject resource in responseDocument.Data.ManyValue.Where(value => value.Type == "carbonWheels"))
695689
{
696690
resource.Links.ShouldNotBeNull();
697691
resource.Links.Self.Should().Be($"/carbonWheels/{resource.Id}");
698692

699-
resource.Attributes.ShouldHaveCount(2);
700-
resource.Attributes.ShouldContainKey("radius");
701-
resource.Attributes.ShouldContainKey("hasTube");
693+
resource.Attributes.ShouldOnlyContainKeys("radius", "hasTube");
702694
}
703695

704696
foreach (ResourceObject resource in responseDocument.Data.ManyValue)
@@ -752,19 +744,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
752744
resource.Links.ShouldNotBeNull();
753745
resource.Links.Self.Should().Be($"/chromeWheels/{resource.Id}");
754746

755-
resource.Attributes.ShouldHaveCount(2);
756-
resource.Attributes.ShouldContainKey("radius");
757-
resource.Attributes.ShouldContainKey("paintColor");
747+
resource.Attributes.ShouldOnlyContainKeys("radius", "paintColor");
758748
}
759749

760750
foreach (ResourceObject resource in responseDocument.Data.ManyValue.Where(value => value.Type == "carbonWheels"))
761751
{
762752
resource.Links.ShouldNotBeNull();
763753
resource.Links.Self.Should().Be($"/carbonWheels/{resource.Id}");
764754

765-
resource.Attributes.ShouldHaveCount(2);
766-
resource.Attributes.ShouldContainKey("radius");
767-
resource.Attributes.ShouldContainKey("hasTube");
755+
resource.Attributes.ShouldOnlyContainKeys("radius", "hasTube");
768756
}
769757

770758
foreach (ResourceObject resource in responseDocument.Data.ManyValue)

‎test/NoEntityFrameworkTests/WorkItemTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public async Task Can_create_WorkItem()
119119
httpResponse.ShouldHaveStatusCode(HttpStatusCode.Created);
120120

121121
responseDocument.Data.SingleValue.ShouldNotBeNull();
122-
responseDocument.Data.SingleValue.Attributes.ShouldNotBeEmpty();
123122
responseDocument.Data.SingleValue.Attributes.ShouldContainKey("isBlocked").With(value => value.Should().Be(newWorkItem.IsBlocked));
124123
responseDocument.Data.SingleValue.Attributes.ShouldContainKey("title").With(value => value.Should().Be(newWorkItem.Title));
125124
responseDocument.Data.SingleValue.Attributes.ShouldContainKey("durationInHours").With(value => value.Should().Be(newWorkItem.DurationInHours));

0 commit comments

Comments
 (0)
Please sign in to comment.