Skip to content

Commit 16270b6

Browse files
author
Bart Koelman
committed
Update to run on EF Core 5
1 parent 9283c72 commit 16270b6

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<NetCoreAppVersion>netcoreapp3.1</NetCoreAppVersion>
44
<AspNetCoreVersion>3.1.*</AspNetCoreVersion>
5-
<EFCoreVersion>3.1.*</EFCoreVersion>
6-
<NpgsqlPostgreSQLVersion>3.1.*</NpgsqlPostgreSQLVersion>
5+
<EFCoreVersion>5.0.*</EFCoreVersion>
6+
<NpgsqlPostgreSQLVersion>5.0.*</NpgsqlPostgreSQLVersion>
77
<CodeAnalysisRuleSet>$(SolutionDir)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
88
</PropertyGroup>
99

test/JsonApiDotNetCoreExampleTests/IntegrationTests/Issue988/EngagementPartyResourceDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public EngagementPartyResourceDefinition(IResourceGraph resourceGraph)
1717
}
1818

1919
/// <inheritdoc />
20-
public override SortExpression OnApplySort(SortExpression? existingSort)
20+
public override SortExpression OnApplySort(SortExpression existingSort)
2121
{
2222
if (existingSort != null)
2323
{

test/JsonApiDotNetCoreExampleTests/IntegrationTests/Issue988/IssueTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
5858
responseDocument.Included.Should().BeNull();
5959
}
6060

61-
[Fact(Skip = "Fails in EF Core with: Invalid include path: 'FirstParties' - couldn't find navigation for: 'FirstParties'")]
61+
[Fact(Skip = "Fails in EF Core with: Unable to find navigation 'FirstParties' specified in string based include path 'FirstParties'.")]
6262
public async Task Can_get_primary_resource_by_ID_with_includes()
6363
{
6464
// Arrange
@@ -183,7 +183,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
183183
responseDocument.Included.Should().BeNull();
184184
}
185185

186-
[Fact(Skip = "Fails in EF Core with: Invalid include path: 'FirstParties' - couldn't find navigation for: 'FirstParties'")]
186+
[Fact(Skip = "Fails in EF Core with: Unable to find navigation 'FirstParties' specified in string based include path 'FirstParties'.")]
187187
public async Task Can_get_unmapped_secondary_resources_by_ID()
188188
{
189189
// Arrange

test/JsonApiDotNetCoreExampleTests/IntegrationTests/RequiredRelationships/DefaultBehaviorTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public async Task Cannot_create_dependent_side_of_required_OneToOne_relationship
9494
Error error = responseDocument.Errors[0];
9595
error.StatusCode.Should().Be(HttpStatusCode.InternalServerError);
9696
error.Title.Should().Be("An unhandled error occurred while processing this request.");
97-
error.Detail.Should().Be("Failed to persist changes in the underlying data store.");
97+
error.Detail.Should().StartWith("The value of 'Shipment.Id' is unknown when attempting to save changes.");
9898
}
9999

100100
[Fact]
@@ -431,7 +431,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
431431
Error error = responseDocument.Errors[0];
432432
error.StatusCode.Should().Be(HttpStatusCode.InternalServerError);
433433
error.Title.Should().Be("An unhandled error occurred while processing this request.");
434-
error.Detail.Should().StartWith("The property 'Id' on entity type 'Shipment' is part of a key and so cannot be modified or marked as modified.");
434+
error.Detail.Should().StartWith("The property 'Shipment.Id' is part of a key and so cannot be modified or marked as modified.");
435435
}
436436

437437
[Fact]
@@ -473,7 +473,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
473473
Error error = responseDocument.Errors[0];
474474
error.StatusCode.Should().Be(HttpStatusCode.InternalServerError);
475475
error.Title.Should().Be("An unhandled error occurred while processing this request.");
476-
error.Detail.Should().StartWith("The property 'Id' on entity type 'Shipment' is part of a key and so cannot be modified or marked as modified.");
476+
error.Detail.Should().StartWith("The property 'Shipment.Id' is part of a key and so cannot be modified or marked as modified.");
477477
}
478478
}
479479
}

test/TestBuildingBlocks/TestBuildingBlocks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
1313
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
1414
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
15-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(AspNetCoreVersion)" />
15+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0" />
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
1717
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlPostgreSQLVersion)" />
1818
<PackageReference Include="xunit" Version="$(XUnitVersion)" />

0 commit comments

Comments
 (0)