using PkmnLib.Dynamic.ScriptHandling; using PkmnLib.Tests.Integration; namespace PkmnLib.Tests.DataTests; public class MoveDataTests { [Test] public async Task AllMoveEffectsHaveValidScripts() { var library = LibraryHelpers.LoadLibrary(); var moveLibrary = library.StaticLibrary.Moves; foreach (var move in moveLibrary) { if (move.SecondaryEffect == null) continue; var scriptName = move.SecondaryEffect.Name; try { await Assert.That(library.ScriptResolver.TryResolve(ScriptCategory.Move, scriptName, move.SecondaryEffect.Parameters, out var script)).IsTrue(); } catch (Exception e) { throw new AggregateException($"Failed to resolve script for move {move.Name} with effect {scriptName}", e); } } } }