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()
|
|
|
|
{
|
2023-06-25 14:30:12 +00:00
|
|
|
var move = MoveData.Create("foobar", new TypeIdentifier(), MoveCategory.Physical, 68, 23, 56,
|
2022-09-18 16:02:27 +00:00
|
|
|
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()
|
|
|
|
{
|
2023-06-25 14:30:12 +00:00
|
|
|
var effect = SecondaryEffect.Create(0.25f, "foobar", Array.Empty<EffectParameter>());
|
|
|
|
var move = MoveData.Create("foobar", new TypeIdentifier(), MoveCategory.Physical, 68, 23, 56,
|
2022-09-20 15:31:20 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|