BadScript 2
Loading...
Searching...
No Matches
BadTestSystem.cs
Go to the documentation of this file.
3
4using NUnitLite;
5
10
14public class BadTestSystem : BadConsoleSystem<BadTestSystemSettings>
15{
20 public BadTestSystem(BadRuntime runtime) : base(runtime) { }
21
23 public override string Name => "test";
24
26 protected override Task<int> Run(BadTestSystemSettings settings)
27 {
28 try
29 {
30 new AutoRun(typeof(BadUnitTests).Assembly).Execute(Array.Empty<string>());
31
32 return Task.FromResult(0);
33 }
34 catch (Exception e)
35 {
36 BadConsole.WriteLine(e.ToString());
37
38 return Task.FromResult(e.HResult);
39 }
40 }
41}
Exposes the BadScript Runtime Functionality to Consumers.
Definition BadRuntime.cs:28
Wrapper class for the console abstraction.
Definition BadConsole.cs:12
static void WriteLine(string str)
Writes a string to the console and appends a newline.
Definition BadConsole.cs:76
Implements a Console System that uses a settings object of Type T.
BadTestSystem(BadRuntime runtime)
Creates a new BadTestSystem instance.
override Task< int > Run(BadTestSystemSettings settings)
Contians the BadScript NUnit Test Cases.
Contains a Console Abstraction Layer to be able to Simulate Console Input/Output over the Network.
Definition BadConsole.cs:6
Contains the 'test' command implementation.
Contains NUnit Extensions and APIs for the BadScript2 Runtime.
Definition BadNUnitApi.cs:7