Slight refactor to clean up resource loading from plugins
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using PkmnLib.Dynamic.Libraries.DataLoaders;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
|
||||
namespace PkmnLib.Tests.Dataloader;
|
||||
|
||||
@@ -7,7 +8,9 @@ public class GrowthRateDataLoaderTests
|
||||
[Test]
|
||||
public async Task TestPrimaryGrowthRateFile()
|
||||
{
|
||||
await using var file = File.Open("Data/GrowthRates.json", FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
IResourceProvider plugin = new Plugin.Gen7.Gen7Plugin();
|
||||
var result = plugin.GetResource(ResourceFileType.GrowthRates)!;
|
||||
await using var file = result.Open();
|
||||
var library = GrowthRateDataLoader.LoadGrowthRates(file);
|
||||
await Assert.That(library).IsNotNull();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user