mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-27 04:38:03 +00:00
Rename root namespace to LBPUnion.ProjectLighthouse
This commit is contained in:
parent
20b35ec95f
commit
581e6bac2a
58 changed files with 178 additions and 162 deletions
|
@ -1,11 +1,11 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using ProjectLighthouse.Types;
|
||||
using ProjectLighthouse.Types.Settings;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class AuthenticationTests : LighthouseTest {
|
||||
[Fact]
|
||||
public async Task ShouldReturnErrorOnNoPostData() {
|
||||
|
@ -43,7 +43,7 @@ namespace ProjectLighthouse.Tests {
|
|||
public async Task CanUseToken() {
|
||||
LoginResult loginResult = await this.Authenticate();
|
||||
|
||||
HttpResponseMessage response = await AuthenticatedRequest("/LITTLEBIGPLANETPS3_XML/eula", loginResult.AuthTicket);
|
||||
HttpResponseMessage response = await this.AuthenticatedRequest("/LITTLEBIGPLANETPS3_XML/eula", loginResult.AuthTicket);
|
||||
string responseContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.True(response.IsSuccessStatusCode);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class DatabaseTests : LighthouseTest {
|
||||
[DatabaseFact]
|
||||
public async Task CanCreateUserTwice() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using ProjectLighthouse.Types.Files;
|
||||
using LBPUnion.ProjectLighthouse.Types.Files;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class FileTypeTests {
|
||||
[Fact]
|
||||
public void ShouldRecognizeLevel() {
|
||||
|
|
|
@ -2,10 +2,10 @@ using System;
|
|||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class MatchTests : LighthouseTest {
|
||||
private static readonly SemaphoreSlim semaphore = new(1, 1);
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace ProjectLighthouse.Tests {
|
|||
LoginResult loginResult = await this.Authenticate();
|
||||
await semaphore.WaitAsync();
|
||||
|
||||
HttpResponseMessage result = await AuthenticatedUploadDataRequest("LITTLEBIGPLANETPS3_XML/match", Array.Empty<byte>(), loginResult.AuthTicket);
|
||||
HttpResponseMessage result = await this.AuthenticatedUploadDataRequest("LITTLEBIGPLANETPS3_XML/match", Array.Empty<byte>(), loginResult.AuthTicket);
|
||||
Assert.True(result.IsSuccessStatusCode);
|
||||
|
||||
semaphore.Release();
|
||||
|
@ -29,7 +29,7 @@ namespace ProjectLighthouse.Tests {
|
|||
|
||||
int oldPlayerCount = await this.GetPlayerCount();
|
||||
|
||||
HttpResponseMessage result = await AuthenticatedUploadDataRequest("LITTLEBIGPLANETPS3_XML/match", Array.Empty<byte>(), loginResult.AuthTicket);
|
||||
HttpResponseMessage result = await this.AuthenticatedUploadDataRequest("LITTLEBIGPLANETPS3_XML/match", Array.Empty<byte>(), loginResult.AuthTicket);
|
||||
Assert.True(result.IsSuccessStatusCode);
|
||||
|
||||
int playerCount = await this.GetPlayerCount();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System.Collections.Generic;
|
||||
using ProjectLighthouse.Serialization;
|
||||
using LBPUnion.ProjectLighthouse.Serialization;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class SerializerTests : LighthouseTest {
|
||||
[Fact]
|
||||
public void BlankElementWorks() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Threading.Tasks;
|
||||
using ProjectLighthouse.Types;
|
||||
using ProjectLighthouse.Types.Levels;
|
||||
using ProjectLighthouse.Types.Profiles;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Levels;
|
||||
using LBPUnion.ProjectLighthouse.Types.Profiles;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class SlotTests : LighthouseTest {
|
||||
[DatabaseFact]
|
||||
public async Task ShouldOnlyShowUsersLevels() {
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Net.Http;
|
|||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace ProjectLighthouse.Tests {
|
||||
namespace LBPUnion.ProjectLighthouse.Tests {
|
||||
public class UploadTests : LighthouseTest {
|
||||
public UploadTests() {
|
||||
string assetsDirectory = Path.Combine(Environment.CurrentDirectory, "r");
|
||||
|
@ -13,31 +13,31 @@ namespace ProjectLighthouse.Tests {
|
|||
|
||||
[Fact]
|
||||
public async Task ShouldNotAcceptScript() {
|
||||
HttpResponseMessage response = await UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/scriptTest", "ExampleFiles/TestScript.ff");
|
||||
HttpResponseMessage response = await this.UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/scriptTest", "ExampleFiles/TestScript.ff");
|
||||
Assert.False(response.IsSuccessStatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ShouldNotAcceptFarc() {
|
||||
HttpResponseMessage response = await UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/farcTest", "ExampleFiles/TestFarc.farc");
|
||||
HttpResponseMessage response = await this.UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/farcTest", "ExampleFiles/TestFarc.farc");
|
||||
Assert.False(response.IsSuccessStatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ShouldNotAcceptGarbage() {
|
||||
HttpResponseMessage response = await UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/garbageTest", "ExampleFiles/TestGarbage.bin");
|
||||
HttpResponseMessage response = await this.UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/garbageTest", "ExampleFiles/TestGarbage.bin");
|
||||
Assert.False(response.IsSuccessStatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ShouldAcceptTexture() {
|
||||
HttpResponseMessage response = await UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/textureTest", "ExampleFiles/TestTexture.tex");
|
||||
HttpResponseMessage response = await this.UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/textureTest", "ExampleFiles/TestTexture.tex");
|
||||
Assert.True(response.IsSuccessStatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ShouldAcceptLevel() {
|
||||
HttpResponseMessage response = await UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/levelTest", "ExampleFiles/TestLevel.lvl");
|
||||
HttpResponseMessage response = await this.UploadFileRequest("/LITTLEBIGPLANETPS3_XML/upload/levelTest", "ExampleFiles/TestLevel.lvl");
|
||||
Assert.True(response.IsSuccessStatusCode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue