PkmnLibRSharp/PkmnLibRSharpTests/StaticData/FormTests.cs

28 lines
1.1 KiB
C#
Raw Normal View History

2022-09-21 17:40:04 +00:00
using System;
using NUnit.Framework;
using PkmnLibSharp.StaticData;
namespace PkmnLibRSharpTests.StaticData
{
public class FormTests
{
[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>());
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]);
}
}
}