Skip to content

Commit

Permalink
Fix compile error for Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ricksu978 committed Feb 11, 2024
1 parent f8d6cf4 commit b51b469
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Moq;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Application.UseCases.Players;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;
using Wsa.Gaas.Werewolf.Domain.Objects;
Expand Down Expand Up @@ -49,7 +50,7 @@ public async Task UseCaseTest()
presenter.Setup(x => x.PresentAsync(It.IsAny<PlayerRoleConfirmedEvent>(), It.IsAny<CancellationToken>()));

// Arrange Use Case
var useCase = new ConfirmPlayerRoleUseCase(
var useCase = new PlayerGetRoleUseCase(
repository.Object,
gameEventBus.Object
);
Expand All @@ -60,7 +61,7 @@ public async Task UseCaseTest()
var playerId = player.UserId;
var expectedRole = player.Role.Name;

var request = new ConfirmPlayerRoleRequest
var request = new PlayerGetRoleRequest
{
DiscordVoiceChannelId = discordVoiceChannelId,
PlayerId = playerId,
Expand All @@ -81,7 +82,7 @@ public Task UseCaseTest2()
// Arrange or Given
ulong discordVoiceChannelId = 3;
ulong playerId = 2;
var request = new ConfirmPlayerRoleRequest
var request = new PlayerGetRoleRequest
{
DiscordVoiceChannelId = discordVoiceChannelId,
PlayerId = playerId,
Expand All @@ -105,7 +106,7 @@ public Task UseCaseTest2()
gameEventBus.Setup(x => x.BroadcastAsync(It.IsAny<PlayerRoleConfirmedEvent>(), It.IsAny<CancellationToken>()));


var useCase = new ConfirmPlayerRoleUseCase(
var useCase = new PlayerGetRoleUseCase(
repository.Object,
gameEventBus.Object
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Moq;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Application.UseCases.Players;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Exceptions;
using Wsa.Gaas.Werewolf.Domain.Objects;
Expand Down Expand Up @@ -47,13 +48,13 @@ public async Task ConfirmPlayerRoleTest1()
gameEventBus.Setup(x => x.BroadcastAsync(It.IsAny<PlayerRoleConfirmedEvent>(), It.IsAny<CancellationToken>()));

// Arrange Use Case
var useCase = new ConfirmPlayerRoleUseCase(
var useCase = new PlayerGetRoleUseCase(
repository.Object,
gameEventBus.Object
);

// Arrange Request
var request = new ConfirmPlayerRoleRequest
var request = new PlayerGetRoleRequest
{
DiscordVoiceChannelId = discordVoiceChannelId,
PlayerId = playerId,
Expand All @@ -73,7 +74,7 @@ public async Task ConfirmPlayerRoleTest1()
public void ConfirmPlayerRoleTest2()
{
// Arrange or Given
var request = new ConfirmPlayerRoleRequest();
var request = new PlayerGetRoleRequest();
var presenter = new Mock<IPresenter<PlayerRoleConfirmedEvent>>();
var gameEventBus = new Mock<GameEventBus>(new Mock<IServiceScopeFactory>().Object);

Expand All @@ -82,7 +83,7 @@ public void ConfirmPlayerRoleTest2()
repository.Setup(r => r.FindByDiscordChannelIdAsync(It.IsAny<ulong>()))
.Returns(Task.FromResult<Game?>(null));

var useCase = new ConfirmPlayerRoleUseCase(
var useCase = new PlayerGetRoleUseCase(
repository.Object,
gameEventBus.Object
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Moq;
using Wsa.Gaas.Werewolf.Application.Common;
using Wsa.Gaas.Werewolf.Application.UseCases;
using Wsa.Gaas.Werewolf.Application.UseCases.Players;
using Wsa.Gaas.Werewolf.Domain.Events;
using Wsa.Gaas.Werewolf.Domain.Objects;

Expand Down

0 comments on commit b51b469

Please sign in to comment.