32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System;
|
|
using NUnit.Framework;
|
|
using PkmnLibSharp.StaticData;
|
|
using PkmnLibSharp.StaticData.Libraries;
|
|
|
|
namespace PkmnLibRSharpTests.StaticData.Libraries
|
|
{
|
|
public class SpeciesLibraryTests
|
|
{
|
|
[Test]
|
|
public void Create()
|
|
{
|
|
using var lib = new SpeciesLibrary(0);
|
|
Assert.AreEqual(0, lib.Length);
|
|
}
|
|
|
|
[Test]
|
|
public void CreateAndAdd()
|
|
{
|
|
using var lib = new SpeciesLibrary(0);
|
|
Assert.AreEqual(0, lib.Length);
|
|
using var stats = new StaticStatisticSet<short>(5, 10, 30, 20, 2, 0);
|
|
using var moves = new LearnableMoves();
|
|
using var form = new Form("foobar", 0.2f, 5.8f, 300, new TypeIdentifier[] { new(1), new(2) }, stats,
|
|
new[] { "foo", "bar" }, new[] { "set" }, moves, Array.Empty<string>());
|
|
using var species = new Species(10, "testSpecies", 0.2f, "growth", 120, form, Array.Empty<string>());
|
|
lib.Add("foobar", species);
|
|
Assert.AreEqual(1, lib.Length);
|
|
Assert.AreEqual("testSpecies", lib["foobar"].Name);
|
|
}
|
|
}
|
|
} |