Massive organization of classes and namespaces

This commit is contained in:
jvyden 2022-05-15 16:45:00 -04:00
commit c345eeebb9
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
218 changed files with 468 additions and 342 deletions

View file

@ -0,0 +1,27 @@
using System;
using System.Threading.Tasks;
using LBPUnion.ProjectLighthouse;
using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
using LBPUnion.ProjectLighthouse.Tests;
using Xunit;
namespace ProjectLighthouse.Tests.GameApiTests.Tests;
public class DatabaseTests : LighthouseServerTest
{
[DatabaseFact]
public async Task CanCreateUserTwice()
{
await using Database database = new();
int rand = new Random().Next();
User userA = await database.CreateUser("unitTestUser" + rand, CryptoHelper.GenerateAuthToken());
User userB = await database.CreateUser("unitTestUser" + rand, CryptoHelper.GenerateAuthToken());
Assert.NotNull(userA);
Assert.NotNull(userB);
await database.RemoveUser(userA); // Only remove userA since userA and userB are the same user
}
}