Implements critical capture, tweaks for integration tests.
All checks were successful
Build / Build (push) Successful in 48s
All checks were successful
Build / Build (push) Successful in 48s
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System.Text.Json;
|
||||
using EnumerableAsyncProcessor.Extensions;
|
||||
using PkmnLib.Dynamic.Libraries;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Plugin.Gen7;
|
||||
using PkmnLib.Static.Species;
|
||||
using PkmnLib.Tests.Integration.Models;
|
||||
|
||||
@@ -10,7 +12,7 @@ public class IntegrationTestRunner
|
||||
{
|
||||
public static IEnumerable<Func<IntegrationTestModel>> TestCases()
|
||||
{
|
||||
var files = Directory.GetFiles("Integration/Tests", "*.json");
|
||||
var files = Directory.GetFiles("../../../../PkmnLib.Tests/Integration/Tests", "*.json");
|
||||
var serializerOptions = new JsonSerializerOptions
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
@@ -32,7 +34,13 @@ public class IntegrationTestRunner
|
||||
[Test, MethodDataSource(nameof(TestCases))]
|
||||
public async Task RunIntegrationTest(IntegrationTestModel test)
|
||||
{
|
||||
var library = LibraryHelpers.LoadLibrary();
|
||||
var library = DynamicLibraryImpl.Create([
|
||||
new Gen7Plugin(new Gen7PluginConfiguration
|
||||
{
|
||||
DamageCalculatorHasRandomness = true,
|
||||
}),
|
||||
]);
|
||||
|
||||
await TestContext.Current!.OutputWriter.WriteLineAsync("File: " + $"file://{test.FileName}");
|
||||
TestContext.Current.AddArtifact(new Artifact
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user