Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade packages to .NET 9 in chapter 4 #187

Merged
merged 5 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/chapter-4-contracts-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Add Evolutionary Architecture Nuget Source
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
with:
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Add Evolutionary Architecture Nuget Source
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>EvolutionaryArchitecture.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisLevel>latest</AnalysisLevel>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.analyzers" Version="1.11.0">
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.analyzers" Version="1.18.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.categories" Version="2.0.8" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
namespace EvolutionaryArchitecture.Fitnet.Contracts.Api.UnitTests.PrepareContract.RequestValidator;

using System.Collections;
using EvolutionaryArchitecture.Fitnet.Contracts.Api.PrepareContract;

internal sealed class InvalidPrepareContractRequestTestCases : TheoryData<PrepareContractRequest>
internal sealed class InvalidPrepareContractRequestTestCases : IEnumerable<object[]>
{
private readonly List<object[]> _testCases = [];
private readonly Faker _faker = new();
private readonly DateTimeOffset _fakeNow = new Faker().Date.RecentOffset();

public InvalidPrepareContractRequestTestCases()
{
var validContractParameters = PrepareContractRequestParameters.GetValid();
AddRow(
new PrepareContractRequest(Guid.Empty, validContractParameters.MinAge, validContractParameters.MaxHeight,
_fakeNow), nameof(PrepareContractRequest.CustomerId));
AddRow(new PrepareContractRequest(Guid.NewGuid(), default, validContractParameters.MaxHeight, _fakeNow),
nameof(PrepareContractRequest.CustomerAge));
AddRow(
new PrepareContractRequest(Guid.NewGuid(), _faker.Random.Number(-100, -1),
validContractParameters.MaxHeight, _fakeNow), nameof(PrepareContractRequest.CustomerAge));
AddRow(new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, default, _fakeNow),
nameof(PrepareContractRequest.CustomerHeight));
AddRow(
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, _faker.Random.Number(-100, -1),
_fakeNow), nameof(PrepareContractRequest.CustomerHeight));
AddRow(
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge,
validContractParameters.MaxHeight, default), nameof(PrepareContractRequest.PreparedAt));
AddRow(
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge,
validContractParameters.MaxHeight, default), nameof(PrepareContractRequest.PreparedAt));
_testCases.Add([
new PrepareContractRequest(Guid.Empty, validContractParameters.MinAge, validContractParameters.MaxHeight, _fakeNow),
nameof(PrepareContractRequest.CustomerId)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), default, validContractParameters.MaxHeight, _fakeNow),
nameof(PrepareContractRequest.CustomerAge)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), _faker.Random.Number(-100, -1), validContractParameters.MaxHeight, _fakeNow),
nameof(PrepareContractRequest.CustomerAge)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, default, _fakeNow),
nameof(PrepareContractRequest.CustomerHeight)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, _faker.Random.Number(-100, -1), _fakeNow),
nameof(PrepareContractRequest.CustomerHeight)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, validContractParameters.MaxHeight, default),
nameof(PrepareContractRequest.PreparedAt)
]);
_testCases.Add([
new PrepareContractRequest(Guid.NewGuid(), validContractParameters.MinAge, validContractParameters.MaxHeight, default),
nameof(PrepareContractRequest.PreparedAt)
]);
}

public IEnumerator<object[]> GetEnumerator() => _testCases.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.6" />
<PackageReference Include="evolutionaryarchitecture.fitnet.contracts.integrationevents" Version="1.0.7" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Contracts.IntegrationEvents" Version="1.0.7" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="MassTransit.Abstractions" Version="8.2.2" />
<PackageReference Include="MassTransit.Abstractions" Version="8.3.4" />
<PackageReference Include="MediatR" Version="12.3.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.UnitTesting" Version="4.1.6" />
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.7" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.UnitTesting" Version="4.1.7" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.analyzers" Version="1.14.0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MassTransit" Version="8.2.2" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.2" />
<PackageReference Include="MediatR" Version="12.3.0" />
<PackageReference Include="MassTransit" Version="8.3.4" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.4" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.6" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Infrastructure" Version="4.1.6" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.6" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.integrationteststoolbox" Version="4.1.6" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.7" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.IntegrationTestsToolbox" Version="4.1.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.6" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" />

</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
<ItemGroup>
<InternalsVisibleTo Include="EvolutionaryArchitecture.Fitnet.Reports.IntegrationTests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Evolutionaryarchitecture.Fitnet.Common.IntegrationTeststoolbox" Version="4.1.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Evolutionaryarchitecture.Fitnet.Common.IntegrationTeststoolbox" Version="4.1.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" />

</ItemGroup>

<ItemGroup>
Expand Down
Loading