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()
|
|
|
|
{
|
2023-06-25 14:30:12 +00:00
|
|
|
var stats = StaticStatisticSet<ushort>.Create(5, 10, 30, 20, 2, 0);
|
|
|
|
var moves = LearnableMoves.Create();
|
|
|
|
var form = Form.Create("foobar", 0.2f, 5.8f, 300, new TypeIdentifier[] { new(1), new(2) }, stats,
|
2022-09-23 18:18:52 +00:00
|
|
|
new[] { "foo", "bar" }, new[] { "set" }, moves, Array.Empty<string>());
|
2022-09-21 17:40:04 +00:00
|
|
|
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]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|