mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
WIP
This commit is contained in:
27
Needlework.Net.Core.Tests/LcuSchemaHandlerTest.cs
Normal file
27
Needlework.Net.Core.Tests/LcuSchemaHandlerTest.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Needlework.Net.Core.Tests;
|
||||
|
||||
public class LcuSchemaHandlerTest
|
||||
{
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
internal HttpClient HttpClient { get; } = new();
|
||||
|
||||
public LcuSchemaHandlerTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task PluginsTestAsync()
|
||||
{
|
||||
var reader = new LcuSchemaHandler(await Resources.GetOpenApiDocumentAsync(HttpClient));
|
||||
|
||||
var plugins = reader.Plugins.Keys.ToList();
|
||||
foreach (var plugin in plugins)
|
||||
_output.WriteLine($"Plugin: {plugin}");
|
||||
|
||||
Assert.True(plugins.Count > 0);
|
||||
}
|
||||
}
|
||||
25
Needlework.Net.Core.Tests/ResourcesTest.cs
Normal file
25
Needlework.Net.Core.Tests/ResourcesTest.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Needlework.Net.Core.Tests;
|
||||
|
||||
public class ResourcesTest
|
||||
{
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
internal HttpClient HttpClient { get; } = new();
|
||||
|
||||
public ResourcesTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DocumentTestAsync()
|
||||
{
|
||||
var document = await Resources.GetOpenApiDocumentAsync(HttpClient);
|
||||
|
||||
Assert.True(document.Info.Title == "LCU SCHEMA");
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace Needlework.Net.Core.Tests;
|
||||
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user