mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-06 00:00:44 +00:00
Remove 7 player mode and show your playlists in LBP3
This commit is contained in:
parent
8d034db465
commit
2949e83e01
4 changed files with 41 additions and 6 deletions
|
@ -1,6 +1,39 @@
|
|||
namespace ProjectLighthouse.Tests.GameApiTests.Unit.Controllers;
|
||||
using System.Threading.Tasks;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers;
|
||||
using LBPUnion.ProjectLighthouse.Tests.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
using LBPUnion.ProjectLighthouse.Types.Serialization.Activity;
|
||||
using LBPUnion.ProjectLighthouse.Types.Users;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests.GameApiTests.Unit.Controllers;
|
||||
|
||||
[Trait("Category", "Unit")]
|
||||
public class ActivityControllerTests
|
||||
{
|
||||
private static void SetupToken(ControllerBase controller, GameVersion version)
|
||||
{
|
||||
GameTokenEntity token = MockHelper.GetUnitTestToken();
|
||||
token.GameVersion = version;
|
||||
controller.SetupTestController(token);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task LBP2GlobalActivity_ShouldReturnNothing_WhenEmpty()
|
||||
{
|
||||
DatabaseContext database = await MockHelper.GetTestDatabase();
|
||||
ActivityController activityController = new(database);
|
||||
SetupToken(activityController, GameVersion.LittleBigPlanet2);
|
||||
|
||||
long timestamp = TimeHelper.TimestampMillis;
|
||||
|
||||
IActionResult response = await activityController.GlobalActivity(timestamp, 0, false, false, false, false, false);
|
||||
GameStream stream = response.CastTo<OkObjectResult, GameStream>();
|
||||
Assert.Null(stream.Groups);
|
||||
Assert.Equal(timestamp, stream.StartTimestamp);
|
||||
}
|
||||
//TODO write activity controller tests
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue