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

This commit is contained in:
2026-08-27 18:30:57 +02:00
parent 3a58f55bbf
commit 942be8eaeb
160 changed files with 1035 additions and 491 deletions

View File

@@ -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();