Implement highest damage AI, further work on AI runner, random fixes
All checks were successful
Build / Build (push) Successful in 51s
All checks were successful
Build / Build (push) Successful in 51s
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
using Assembly = System.Reflection.Assembly;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Tests.Scripts;
|
||||
|
||||
public class GenericScriptTests
|
||||
{
|
||||
[Test]
|
||||
public async Task EveryScriptHasAttribute()
|
||||
{
|
||||
var scripts = typeof(Gen7Plugin).Assembly.GetTypes()
|
||||
.Where(t => t.IsSubclassOf(typeof(Script)) && !t.IsAbstract);
|
||||
foreach (var script in scripts)
|
||||
{
|
||||
var attributes = script.GetCustomAttributes(typeof(ScriptAttribute), false);
|
||||
await Assert.That(attributes).IsNotEmpty().Because(
|
||||
$"Script {script.Name} does not have the Script attribute defined.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user