Implements dataloading

This commit is contained in:
2024-08-18 14:22:50 +02:00
parent 488c717c5a
commit d48889e21a
36 changed files with 105526 additions and 15 deletions

View File

@@ -0,0 +1,35 @@
using PkmnLib.Dataloader;
using PkmnLib.Static.Libraries;
namespace PkmnLib.Tests.Dataloader;
public class MoveDataLoaderTests
{
[Test]
public void TestPrimaryMoveFile()
{
using var stream = File.OpenRead("Data/Moves.json");
var typeLibrary = new TypeLibrary();
typeLibrary.RegisterType("Normal");
typeLibrary.RegisterType("Fire");
typeLibrary.RegisterType("Water");
typeLibrary.RegisterType("Electric");
typeLibrary.RegisterType("Grass");
typeLibrary.RegisterType("Ice");
typeLibrary.RegisterType("Fighting");
typeLibrary.RegisterType("Poison");
typeLibrary.RegisterType("Ground");
typeLibrary.RegisterType("Flying");
typeLibrary.RegisterType("Psychic");
typeLibrary.RegisterType("Bug");
typeLibrary.RegisterType("Rock");
typeLibrary.RegisterType("Ghost");
typeLibrary.RegisterType("Dragon");
typeLibrary.RegisterType("Dark");
typeLibrary.RegisterType("Steel");
typeLibrary.RegisterType("Fairy");
var library = MoveDataLoader.LoadMoves(stream, typeLibrary);
Assert.That(library, Is.Not.Null);
}
}