Replace all raw string comparisons with StringKey, source generator that creates cache keys for all names for Gen7 plugin
All checks were successful
Build / Build (push) Successful in 2m21s
All checks were successful
Build / Build (push) Successful in 2m21s
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Text.Json.Serialization;
|
||||
using CSPath;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.Models.Choices;
|
||||
using PkmnLib.Static.Utils;
|
||||
using JsonSerializer = System.Text.Json.JsonSerializer;
|
||||
|
||||
namespace PkmnLib.Tests.Integration.Models;
|
||||
@@ -39,7 +40,8 @@ public class SetMoveChoiceAction : IntegrationTestAction
|
||||
{
|
||||
var user = battle.Sides[Place[0]].Pokemon[Place[1]];
|
||||
await Assert.That(user).IsNotNull();
|
||||
var move = user!.Moves.First(m => m?.MoveData.Name == Move);
|
||||
StringKey moveName = Move;
|
||||
var move = user!.Moves.First(m => m?.MoveData.Name == moveName);
|
||||
await Assert.That(move).IsNotNull();
|
||||
var res = battle.TrySetChoice(new MoveChoice(user, move!, Target[0], Target[1]));
|
||||
await Assert.That(res).IsTrue();
|
||||
|
||||
Reference in New Issue
Block a user