Adds Species interface
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
25
PkmnLibRSharpTests/StaticData/SpeciesTests.cs
Normal file
25
PkmnLibRSharpTests/StaticData/SpeciesTests.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using PkmnLibSharp.StaticData;
|
||||
|
||||
namespace PkmnLibRSharpTests.StaticData
|
||||
{
|
||||
public class SpeciesTests
|
||||
{
|
||||
[Test]
|
||||
public void BasicTests()
|
||||
{
|
||||
using var form = new Form("foobar", 0.2f, 5.8f, 300, new TypeIdentifier[] { new(1), new(2) },
|
||||
new StaticStatisticSet<short>(5, 10, 30, 20, 2, 0), new[] { "foo", "bar" }, new[] { "set" },
|
||||
new LearnableMoves(), Array.Empty<string>());
|
||||
using var species = new Species(10, "testSpecies", 0.2f, "growth", 120, form, Array.Empty<string>());
|
||||
Assert.AreEqual(10, species.Id);
|
||||
Assert.AreEqual("testSpecies", species.Name);
|
||||
Assert.AreEqual(0.2f, species.GenderRate, 0.00001f);
|
||||
Assert.AreEqual("growth", species.GrowthRate);
|
||||
Assert.AreEqual(120, species.CaptureRate);
|
||||
Assert.That(species.TryGetForm("default", out var defaultForm));
|
||||
Assert.AreEqual("foobar", defaultForm!.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user