28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System;
|
|
using NUnit.Framework;
|
|
using PkmnLibSharp.StaticData;
|
|
|
|
namespace PkmnLibRSharpTests.StaticData
|
|
{
|
|
public class FormTests
|
|
{
|
|
[Test]
|
|
public void BasicTests()
|
|
{
|
|
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>());
|
|
Assert.AreEqual("foobar", form.Name);
|
|
Assert.AreEqual(0.2f, form.Height, 0.00001f);
|
|
Assert.AreEqual(5.8f, form.Weight, 0.00001f);
|
|
Assert.AreEqual(300, form.BaseExperience);
|
|
Assert.AreEqual(new TypeIdentifier(1), form.Types[0]);
|
|
Assert.AreEqual(new TypeIdentifier(2), form.Types[1]);
|
|
Assert.AreEqual(10, form.BaseStats.Attack);
|
|
Assert.AreEqual("foo", form.Abilities[0]);
|
|
Assert.AreEqual("bar", form.Abilities[1]);
|
|
Assert.AreEqual("set", form.HiddenAbilities[0]);
|
|
}
|
|
}
|
|
} |