Migrate to TUnit for unit tests

This commit is contained in:
2024-12-27 14:30:22 +01:00
parent 5b518df24a
commit 853d6dd1cb
19 changed files with 158 additions and 184 deletions

View File

@@ -6,9 +6,9 @@ namespace PkmnLib.Tests.Dataloader;
public class SpeciesDataloaderTests
{
[Test]
public void TestPrimarySpeciesFile()
public async Task TestPrimarySpeciesFile()
{
using var file = File.Open("Data/Pokemon.json", FileMode.Open);
using var file = File.Open("Data/Pokemon.json", FileMode.Open, FileAccess.Read, FileShare.Read);
var typeLibrary = new TypeLibrary();
typeLibrary.RegisterType("Normal");
typeLibrary.RegisterType("Fire");
@@ -30,6 +30,6 @@ public class SpeciesDataloaderTests
typeLibrary.RegisterType("Fairy");
var library = SpeciesDataLoader.LoadSpecies(file, typeLibrary);
Assert.NotNull(library);
await Assert.That(library).IsNotNull();
}
}