The Great Formatting of 2022

This commit is contained in:
jvyden 2022-01-18 23:09:02 -05:00
parent 59cc7f02fb
commit 35f50f5f8c
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
162 changed files with 6609 additions and 6809 deletions

View file

@ -6,23 +6,22 @@ using LBPUnion.ProjectLighthouse.Tests;
using LBPUnion.ProjectLighthouse.Types;
using Xunit;
namespace ProjectLighthouse.Tests.GameApiTests
namespace ProjectLighthouse.Tests.GameApiTests;
public class DatabaseTests : LighthouseServerTest
{
public class DatabaseTests : LighthouseServerTest
[DatabaseFact]
public async Task CanCreateUserTwice()
{
[DatabaseFact]
public async Task CanCreateUserTwice()
{
await using Database database = new();
int rand = new Random().Next();
await using Database database = new();
int rand = new Random().Next();
User userA = await database.CreateUser("createUserTwiceTest" + rand, HashHelper.GenerateAuthToken());
User userB = await database.CreateUser("createUserTwiceTest" + rand, HashHelper.GenerateAuthToken());
User userA = await database.CreateUser("createUserTwiceTest" + rand, HashHelper.GenerateAuthToken());
User userB = await database.CreateUser("createUserTwiceTest" + rand, HashHelper.GenerateAuthToken());
Assert.NotNull(userA);
Assert.NotNull(userB);
Assert.NotNull(userA);
Assert.NotNull(userB);
await database.RemoveUser(userA); // Only remove userA since userA and userB are the same user
}
await database.RemoveUser(userA); // Only remove userA since userA and userB are the same user
}
}