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

nuget and .net8 upgrade #73

Merged
merged 1 commit into from
Jan 19, 2024
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
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/Common/GameEventBus.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Application.Common;
public class GameEventBus
Expand Down
4 changes: 1 addition & 3 deletions src/BackEnd/src/Application/Common/IGameEventHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Application.Common;
namespace Wsa.Gaas.Werewolf.Application.Common;
public interface IGameEventHandler
{
Task Handle(GameEvent events, CancellationToken cancellationToken = default);
Expand Down
4 changes: 1 addition & 3 deletions src/BackEnd/src/Application/Common/IPresenter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Application.Common;
namespace Wsa.Gaas.Werewolf.Application.Common;
public interface IPresenter<TGameEvent>
where TGameEvent : GameEvent
{
Expand Down
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/Common/Policy.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.Extensions.Options;
using Wsa.Gaas.Werewolf.Application.Options;
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Application.Common;
internal abstract class Policy<T> : IGameEventHandler<T>
Expand Down
1 change: 1 addition & 0 deletions src/BackEnd/src/Application/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
global using Wsa.Gaas.Werewolf.Application.Common;
global using Wsa.Gaas.Werewolf.Domain.Common;
global using Wsa.Gaas.Werewolf.Domain.Events;
global using Wsa.Gaas.Werewolf.Domain.Exceptions;
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/UseCases/CreateGameUseCase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
Expand Down
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/UseCases/GetGameUseCase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
Expand Down
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/UseCases/StartGameUseCase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 1 addition & 12 deletions src/BackEnd/src/Domain/Wsa.Gaas.Werewolf.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Services\**" />
<EmbeddedResource Remove="Services\**" />
<None Remove="Services\**" />
</ItemGroup>

<ItemGroup>
<None Remove="Events\NewFile1.txt" />
<None Remove="Exceptions\NewFile1.txt" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Wsa.Gaas.Werewolf.WebApiTests" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/BackEnd/src/InterfaceAdapter/WebApi/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
global using Wsa.Gaas.Werewolf.Application.UseCases;
using FastEndpoints;
using FastEndpoints.Swagger;
using System.Text.Json.Serialization;
using Wsa.Gaas.Werewolf.Application;
using Wsa.Gaas.Werewolf.Application.Common;
Expand Down Expand Up @@ -36,6 +35,6 @@

// Swagger
app.UseOpenApi();
app.UseSwaggerUi3(c => c.ConfigureDefaults());
//app.UseSwaggerUi3(c => c.ConfigureDefaults());

app.Run();
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -11,11 +11,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FastEndpoints" Version="5.13.0" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.13.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="7.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.8">
<PackageReference Include="FastEndpoints" Version="5.21.2" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.21.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public void OneTimeSetUp()
var repository = GetRepository();
repository.Initialize();
}
[OneTimeTearDown]
public void OneTimeTearDown()
{
_provider.Dispose();
}

private IRepository GetRepository()
{
Expand All @@ -32,7 +37,7 @@ public async Task SaveTest()
var game = new Game();
repository.Save(game);

game.StartGame(new ulong[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
game.StartGame([1, 2, 3, 4, 5, 6, 7, 8, 9]);
repository.Save(game);

game.CurrentSpeakingPlayerId = game.Players.First(x => x.UserId == 3).Id;
Expand Down
25 changes: 10 additions & 15 deletions src/BackEnd/test/WebApiTests/Wsa.Gaas.Werewolf.WebApiTests.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Bogus" Version="35.4.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1">
<PackageReference Include="NUnit.Analyzers" Version="3.10.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -26,7 +26,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Testcontainers" Version="3.3.0" />
<PackageReference Include="Testcontainers" Version="3.7.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -36,9 +36,4 @@
<ProjectReference Include="..\..\src\InterfaceAdapter\WebApi\Wsa.Gaas.Werewolf.WebApi.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="TDD\EntityFrameworkCoreTest\" />
<Folder Include="TDD\WebApiTest\" />
</ItemGroup>

</Project>