Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -70,8 +70,8 @@ public class MultiAttackTests
|
||||
|
||||
// Arrange
|
||||
var move = Substitute.For<IExecutingMove>();
|
||||
var target = Substitute.For<IPokemon>();
|
||||
var user = Substitute.For<IPokemon>();
|
||||
var target = Substitute.For<IBattlePokemon>();
|
||||
var user = Substitute.For<IBattlePokemon>();
|
||||
TypeIdentifier? typeIdentifier = new TypeIdentifier(1, "Normal");
|
||||
var dynamicLibrary = Substitute.For<IDynamicLibrary>();
|
||||
var staticLibrary = Substitute.For<IStaticLibrary>();
|
||||
@@ -101,14 +101,14 @@ public class MultiAttackTests
|
||||
/// Creates a mocked executing move whose user holds a fire_memory, with a type library that knows both
|
||||
/// "normal" and "fire".
|
||||
/// </summary>
|
||||
private static (IExecutingMove move, IPokemon user) CreateMemoryHolderSetup()
|
||||
private static (IExecutingMove move, IBattlePokemon user) CreateMemoryHolderSetup()
|
||||
{
|
||||
var typeLibrary = new TypeLibrary();
|
||||
typeLibrary.RegisterType("normal");
|
||||
typeLibrary.RegisterType("fire");
|
||||
|
||||
var move = Substitute.For<IExecutingMove>();
|
||||
var user = Substitute.For<IPokemon>();
|
||||
var user = Substitute.For<IBattlePokemon>();
|
||||
var dynamicLibrary = Substitute.For<IDynamicLibrary>();
|
||||
var staticLibrary = Substitute.For<IStaticLibrary>();
|
||||
var item = Substitute.For<IItem>();
|
||||
@@ -140,7 +140,7 @@ public class MultiAttackTests
|
||||
var multiAttack = new MultiAttack();
|
||||
|
||||
// Act
|
||||
multiAttack.ChangeMoveType(move, Substitute.For<IPokemon>(), 0, ref typeIdentifier);
|
||||
multiAttack.ChangeMoveType(move, Substitute.For<IBattlePokemon>(), 0, ref typeIdentifier);
|
||||
|
||||
// Assert
|
||||
await Assert.That(typeIdentifier!.Value.Name.ToString()).IsEqualTo("normal");
|
||||
@@ -168,7 +168,7 @@ public class MultiAttackTests
|
||||
var multiAttack = new MultiAttack();
|
||||
|
||||
// Act
|
||||
multiAttack.ChangeMoveType(move, Substitute.For<IPokemon>(), 0, ref typeIdentifier);
|
||||
multiAttack.ChangeMoveType(move, Substitute.For<IBattlePokemon>(), 0, ref typeIdentifier);
|
||||
|
||||
// Assert
|
||||
await Assert.That(typeIdentifier!.Value.Name.ToString()).IsEqualTo("normal");
|
||||
|
||||
Reference in New Issue
Block a user