PkmnLibRSharp/PkmnLibRSharpTests/StaticData/MoveDataTests.cs

35 lines
1.3 KiB
C#
Raw Normal View History

2022-09-18 16:02:27 +00:00
using System;
using NUnit.Framework;
using PkmnLibSharp.StaticData;
namespace PkmnLibRSharpTests.StaticData
{
public class MoveDataTests
{
[Test]
public void BasicTests()
{
using var move = new MoveData("foobar", new TypeIdentifier(), MoveCategory.Physical, 68, 23, 56,
MoveTarget.Any, -3, null, Array.Empty<string>());
Assert.AreEqual("foobar", move.Name);
Assert.AreEqual(MoveCategory.Physical, move.Category);
Assert.AreEqual(68, move.BasePower);
Assert.AreEqual(23, move.Accuracy);
Assert.AreEqual(56, move.BaseUsages);
Assert.AreEqual(MoveTarget.Any, move.Target);
Assert.AreEqual(-3, move.Priority);
Assert.AreEqual(null, move.SecondaryEffect);
}
2022-09-20 15:31:20 +00:00
[Test]
public void TestMoveWithSecondaryEffect()
{
using var effect = new SecondaryEffect(0.25f, "foobar", Array.Empty<EffectParameter>());
using var move = new MoveData("foobar", new TypeIdentifier(), MoveCategory.Physical, 68, 23, 56,
MoveTarget.Any, -3, effect, Array.Empty<string>());
Assert.That(move.SecondaryEffect != null);
Assert.AreEqual("foobar", move.SecondaryEffect!.Name);
}
2022-09-18 16:02:27 +00:00
}
}