-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/Modules/RoundRankingModule.Tests/Controllers/RoundRankingEventControllerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using EvoSC.Common.Interfaces.Controllers; | ||
using EvoSC.Common.Remote.EventArgsModels; | ||
using EvoSC.Modules.Official.RoundRankingModule.Controllers; | ||
using EvoSC.Modules.Official.RoundRankingModule.Interfaces; | ||
using EvoSC.Testing.Controllers; | ||
using Moq; | ||
using Xunit; | ||
|
||
namespace EvoSC.Modules.Official.RoundRankingModule.Tests.Controllers; | ||
|
||
public class RoundRankingEventControllerTests : ControllerMock<RoundRankingEventController, IEventControllerContext> | ||
{ | ||
private Mock<IRoundRankingService> _roundRankingService = new(); | ||
|
||
public RoundRankingEventControllerTests() | ||
{ | ||
InitMock(_roundRankingService); | ||
} | ||
|
||
[Fact] | ||
public async Task Consumes_Checkpoint_Data() | ||
{ | ||
Controller.OnWaypointAsync(null, | ||
new WayPointEventArgs | ||
{ | ||
Login = "*fakeplayer1*", | ||
AccountId = "*fakeplayer1*", | ||
RaceTime = 0, | ||
LapTime = 0, | ||
CheckpointInRace = 0, | ||
CheckpointInLap = 0, | ||
IsEndRace = false, | ||
IsEndLap = false, | ||
CurrentRaceCheckpoints = [], | ||
CurrentLapCheckpoints = [], | ||
BlockId = "", | ||
Speed = 0, | ||
Time = 0 | ||
}); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/Modules/RoundRankingModule.Tests/Models/CheckpointsRepositoryTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace EvoSC.Modules.Official.RoundRankingModule.Tests.Models; | ||
|
||
public class CheckpointsRepositoryTests | ||
{ | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
tests/Modules/RoundRankingModule.Tests/RoundRankingModule.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>EvoSC.Modules.Official.RoundRankingModule.Tests</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\EvoSC.Testing\EvoSC.Testing.csproj" /> | ||
<ProjectReference Include="..\..\..\src\Modules\RoundRankingModule\RoundRankingModule.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="xunit.core"> | ||
<HintPath>..\..\..\..\..\.nuget\packages\xunit.extensibility.core\2.8.1\lib\netstandard1.1\xunit.core.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
tests/Modules/RoundRankingModule.Tests/Services/RoundRankingServiceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace EvoSC.Modules.Official.RoundRankingModule.Tests.Services; | ||
|
||
public class RoundRankingServiceTests | ||
{ | ||
|
||
} |