More tests, more fixes
All checks were successful
Build / Build (push) Successful in 1m57s

This commit is contained in:
2026-07-05 18:26:55 +02:00
parent 1ab15110f5
commit 6a82c20cf2
20 changed files with 1682 additions and 12 deletions

View File

@@ -0,0 +1,48 @@
using PkmnLib.Dynamic.Models;
using PkmnLib.Plugin.Gen7.Scripts.Moves;
namespace PkmnLib.Plugin.Gen7.Tests.Scripts.Moves;
/// <summary>
/// Tests for the <see cref="ChipAway"/> move script.
/// Gen VII Bulbapedia behavior: "Chip Away inflicts damage, ignoring any changes to the target's Defense
/// and evasion stat stages — positive and negative."
/// </summary>
public class ChipAwayTests
{
/// <summary>
/// Bulbapedia: Chip Away inflicts damage "ignoring any changes to the target's Defense [...] stat
/// stages".
/// </summary>
[Test]
public async Task BypassDefensiveStatBoosts_Always_Bypasses()
{
// Arrange
var script = new ChipAway();
var bypass = false;
// Act
script.BypassDefensiveStatBoosts(Substitute.For<IExecutingMove>(), Substitute.For<IPokemon>(), 0, ref bypass);
// Assert
await Assert.That(bypass).IsTrue();
}
/// <summary>
/// Bulbapedia: Chip Away inflicts damage "ignoring any changes to the target's [...] evasion stat
/// stages".
/// </summary>
[Test]
public async Task BypassEvasionStatBoosts_Always_Bypasses()
{
// Arrange
var script = new ChipAway();
var bypass = false;
// Act
script.BypassEvasionStatBoosts(Substitute.For<IExecutingMove>(), Substitute.For<IPokemon>(), 0, ref bypass);
// Assert
await Assert.That(bypass).IsTrue();
}
}