Skip to content

Commit

Permalink
Clean namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ricksu978 committed Jan 19, 2024
1 parent 8ef5666 commit 91a63eb
Show file tree
Hide file tree
Showing 49 changed files with 37 additions and 118 deletions.
1 change: 0 additions & 1 deletion src/BackEnd/src/Application/DependencyInjection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application;
public static class DependencyInjection
Expand Down
5 changes: 3 additions & 2 deletions src/BackEnd/src/Application/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
global using Wsa.Gaas.Werewolf.Domain.Events;
global using Wsa.Gaas.Werewolf.Domain.Exceptions;
global using Wsa.Gaas.Werewolf.Application.Common;
global using Wsa.Gaas.Werewolf.Domain.Events;
global using Wsa.Gaas.Werewolf.Domain.Exceptions;
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.Extensions.Options;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.Options;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;

namespace Wsa.Gaas.Werewolf.Application.Policies;
internal class PlayerRoleConfirmationStartedPolicy : Policy<PlayerRoleConfirmationStartedEvent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.Extensions.Options;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.Options;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;

namespace Wsa.Gaas.Werewolf.Application.Policies;
internal class SeerRoundStartedEventPolicy : Policy<SeerRoundStartedEvent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.Extensions.Options;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.Options;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;

namespace Wsa.Gaas.Werewolf.Application.Policies;
internal class WerewolfRoundStartedEventPolicy : Policy<WerewolfRoundStartedEvent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.Extensions.Options;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.Options;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;

namespace Wsa.Gaas.Werewolf.Application.Policies;
internal class WitchAntidoteRoundStartedEventPolicy : Policy<WitchAntidoteRoundStartedEvent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class ConfirmPlayerRoleRequest
{
public ulong DiscordVoiceChannelId { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions 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.Common;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class DiscoverPlayerRoleRequest
{
public ulong DiscordVoiceChannelId { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions src/BackEnd/src/Application/UseCases/EndGameUseCase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class EndGameRequest
Expand Down
5 changes: 1 addition & 4 deletions src/BackEnd/src/Application/UseCases/GetGameUseCase.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;
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,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class PlayerTriggerSkillRequest
{
public ulong DiscordVoiceChannelId { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions 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.Common;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Application.Dtos;
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;

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

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class WerewolfVoteRequest
{
public ulong DiscordChannelId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class WitchUseAntidoteRequest
{
public ulong DiscordVoiceChannelId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.Application.UseCases;
namespace Wsa.Gaas.Werewolf.Application.UseCases;
public class WitchUsePoisonRequest
{
public ulong DiscordVoiceChannelId { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions src/BackEnd/src/Domain/Events/PlayerTriggerSkillEvent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Domain.Events;
public class PlayerTriggerSkillEvent : GameEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Domain.Events;
public class WitchPoisonRoundStartedEvent : GameEvent
Expand Down
3 changes: 1 addition & 2 deletions src/BackEnd/src/Domain/Events/WitchPoisonUsedEvent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Domain.Events;
public class WitchPoisonUsedEvent : GameEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class GameAlreadyEndedException : GameException
{
public GameAlreadyEndedException(ulong discordChannelId) : base($"Game already Ended #{discordChannelId}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
internal class GameAlreadyStartedException : GameException
{
public GameAlreadyStartedException() : base("Game already started")
Expand Down
4 changes: 1 addition & 3 deletions src/BackEnd/src/Domain/Exceptions/GameNotStartedException.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.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
internal class GameNotStartedException : GameException
{
public GameNotStartedException(ulong discordVoiceChannelId)
Expand Down
3 changes: 1 addition & 2 deletions src/BackEnd/src/Domain/Exceptions/GameStatusException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
internal class GameStatusException : GameException
Expand Down
4 changes: 1 addition & 3 deletions src/BackEnd/src/Domain/Exceptions/PlayerNotFoundException.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.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class PlayerNotFoundException : GameException
{
public PlayerNotFoundException(ulong discordVoiceChannelId, ulong playerId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class PlayerNotSurvivedException : GameException
{
public PlayerNotSurvivedException(int playerNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class PlayerNotWerewolfException : GameException
{
public PlayerNotWerewolfException(string message) : base(message)
Expand Down
4 changes: 1 addition & 3 deletions src/BackEnd/src/Domain/Exceptions/PlayerNotWitchException.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.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class PlayerNotWitchException : GameException
{
public PlayerNotWitchException(string message) : base(message)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
public class PlayerRoleNotAssignedException : GameException
{
public PlayerRoleNotAssignedException(ulong playerId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Domain.Common;

namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
namespace Wsa.Gaas.Werewolf.Domain.Exceptions;
internal class PlayersNumberNotSupportedException : GameException
{
public PlayersNumberNotSupportedException()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;

public class ConfirmPlayerRoleEndpoint : WebApiEndpoint<ConfirmPlayerRoleRequest, ConfirmPlayerRoleResponse>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;
public class CreateGameEndpoint : WebApiEndpoint<CreateGameRequest, CreateGameResponse>
{
public override void Configure()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;
public class DiscoverPlayerRoleEndpoint : WebApiEndpoint<DiscoverPlayerRoleRequest, DiscoverPlayerRoleResponse>
{
public override void Configure()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;
public class EndGameEndpoint : WebApiEndpoint<EndGameRequest, EndGameResponse>
{
public override void Configure()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;

public class GetGameEndpoint : WebApiEndpoint<GetGameRequest, GetGameResponse>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Wsa.Gaas.Werewolf.Application;
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.WebApi.Endpoints;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;
public class WerewolfVoteEndpoint : WebApiEndpoint<WerewolfVoteRequest, WerewolfVoteResponse>
{
public override void Configure()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;
public class WitchUseAntidoteEndpoint : WebApiEndpoint<WitchUseAntidoteRequest, WitchUseAntidoteResponse>
{
public override void Configure()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Wsa.Gaas.Werewolf.Application.UseCases;

namespace Wsa.Gaas.Werewolf.Application;
namespace Wsa.Gaas.Werewolf.Application;


public class WitchUsePoisonEndpoint : WebApiEndpoint<WitchUsePoisonRequest, WitchUsePoisonResponse>
Expand Down
2 changes: 1 addition & 1 deletion src/BackEnd/src/InterfaceAdapter/WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

builder.Services
.AddWebApi(builder.Configuration)

// Application
.AddWerewolfApplication()

Expand Down
2 changes: 0 additions & 2 deletions src/BackEnd/src/InterfaceAdapter/WebApi/WebApiDefaults.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Wsa.Gaas.Werewolf.Application;
using Wsa.Gaas.Werewolf.WebApi;

public static class WebApiDefaults
{
public const string SignalrEndpoint = "/events"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.WebApi.Endpoints;
using Wsa.Gaas.Werewolf.WebApiTests.ATDD.Common;

namespace Wsa.Gaas.Werewolf.WebApiTests.ATDD.GameTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.WebApi.Endpoints;
using Wsa.Gaas.Werewolf.WebApiTests.ATDD.Common;

namespace Wsa.Gaas.Werewolf.WebApiTests.ATDD.GameTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Text.Json.Serialization;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.WebApi.Endpoints;
using Wsa.Gaas.Werewolf.WebApiTests.ATDD.Common;

namespace Wsa.Gaas.Werewolf.WebApiTests.ATDD.GameTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.WebApi.Endpoints;
using Wsa.Gaas.Werewolf.WebApiTests.ATDD.Common;

namespace Wsa.Gaas.Werewolf.WebApiTests.ATDD.GameTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Objects;
using Wsa.Gaas.Werewolf.Domain.Objects.Roles;
using Wsa.Gaas.Werewolf.WebApi.Endpoints;
using Wsa.Gaas.Werewolf.WebApiTests.ATDD.Common;

namespace Wsa.Gaas.Werewolf.WebApiTests.ATDD.GameTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task UseCaseTest()
await useCase.ExecuteAsync(request);

// Then

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.Application;
using Wsa.Gaas.Werewolf.WebApiTests.TDD.ApplicationTest.UseCases;


public class ConfirmPlayerRoleUseCaseTests
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Microsoft.Extensions.DependencyInjection;
using Moq;
using System.Linq.Expressions;
using Wsa.Gaas.Werewolf.Application;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Domain.Common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Bogus.DataSets;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Objects;

namespace Wsa.Gaas.Werewolf.WebApiTests.TDD.DomainTest;
Expand Down

0 comments on commit 91a63eb

Please sign in to comment.