PkmnLibRSharp/PkmnLibRSharpTests/StaticData/MoveDataTests.cs

35 lines
1.3 KiB
C#

using System;
using NUnit.Framework;
using PkmnLibSharp.StaticData;
namespace PkmnLibRSharpTests.StaticData
{
public class MoveDataTests
{
[Test]
public void BasicTests()
{
var move = MoveData.Create("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);
}
[Test]
public void TestMoveWithSecondaryEffect()
{
var effect = SecondaryEffect.Create(0.25f, "foobar", Array.Empty<EffectParameter>());
var move = MoveData.Create("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);
}
}
}