Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7.Tests/Scripts/Moves/DoubleHitMoveTests.cs

31 lines
1.1 KiB
C#

using PkmnLib.Dynamic.Models.Choices;
using PkmnLib.Plugin.Gen7.Scripts.Moves;
namespace PkmnLib.Plugin.Gen7.Tests.Scripts.Moves;
/// <summary>
/// Tests for the <see cref="DoubleHitMove"/> script, which implements Double Hit (and the other
/// fixed two-hit moves such as Double Kick, Dual Chop, Bonemerang and Gear Grind).
/// Behavior is verified against the Bulbapedia page for Double Hit.
/// </summary>
public class DoubleHitMoveTests
{
/// <summary>
/// Bulbapedia: "Double Hit inflicts damage, hitting twice per use." The number of hits is always set
/// to two, regardless of the default.
/// </summary>
[Test, Arguments((byte)1), Arguments((byte)2), Arguments((byte)5)]
public async Task ChangeNumberOfHits_AnyInitialValue_SetsNumberOfHitsToTwo(byte initialHits)
{
// Arrange
var script = new DoubleHitMove();
var choice = Substitute.For<IMoveChoice>();
var numberOfHits = initialHits;
// Act
script.ChangeNumberOfHits(choice, ref numberOfHits);
// Assert
await Assert.That(numberOfHits).IsEqualTo((byte)2);
}
}