This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
Emma [it/its]@Rory& abb1b570a4 Local changes
2025-10-05 21:34:40 +02:00

24 lines
788 B
C#

// See https://aka.ms/new-console-template for more information
using ArcaneLibs;
using Spacebar.AdminApi.PrepareTestData.TestDataTypes;
Console.WriteLine("Hello, World!");
var tests = ClassCollector<ITestData>.ResolveFromAllAccessibleAssemblies();
foreach (var test in tests) {
Console.WriteLine(test.Name);
}
Console.Write("Enter test type to run: ");
var testType = Console.ReadLine();
var testToRun = tests.FirstOrDefault(t => t.Name == testType);
var runMethod = testToRun?.GetMethod("Run");
if (runMethod != null) {
Console.WriteLine($"Running test {testToRun.FullName}...");
var task = runMethod.Invoke(testToRun, null) as Task;
await task!;
Console.WriteLine($"Test {testToRun.FullName} completed.");
} else {
Console.WriteLine("Test not found.");
}