Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -14,14 +14,14 @@ public class FellStingerTests
|
||||
/// <summary>
|
||||
/// Creates a fully mocked test setup for Fell Stinger tests.
|
||||
/// </summary>
|
||||
private static (FellStinger script, IExecutingMove move, IPokemon user, IPokemon target) CreateTestSetup(
|
||||
bool targetFainted)
|
||||
private static (FellStinger script, IExecutingMove move, IBattlePokemon user, IBattlePokemon target)
|
||||
CreateTestSetup(bool targetFainted)
|
||||
{
|
||||
var script = new FellStinger();
|
||||
var move = Substitute.For<IExecutingMove>();
|
||||
var user = Substitute.For<IPokemon>();
|
||||
var user = Substitute.For<IBattlePokemon>();
|
||||
move.User.Returns(user);
|
||||
var target = Substitute.For<IPokemon>();
|
||||
var target = Substitute.For<IBattlePokemon>();
|
||||
target.IsFainted.Returns(targetFainted);
|
||||
return (script, move, user, target);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class FellStingerTests
|
||||
/// <summary>
|
||||
/// Helper to find the first ChangeStatBoost call received by a Pokémon substitute.
|
||||
/// </summary>
|
||||
private static object[]? GetStatBoostArguments(IPokemon pokemon)
|
||||
private static object[]? GetStatBoostArguments(IBattlePokemon pokemon)
|
||||
{
|
||||
var call = pokemon.ReceivedCalls().FirstOrDefault(c => c.GetMethodInfo().Name == "ChangeStatBoost");
|
||||
return call?.GetArguments()!;
|
||||
|
||||
Reference in New Issue
Block a user