BadScript 2
Loading...
Searching...
No Matches
BadNUnitTestConsole.cs
Go to the documentation of this file.
2
3using NUnit.Framework;
4
6
11{
13 public void Write(string str)
14 {
15 TestContext.Write(str);
16 }
17
19 public void WriteLine(string str)
20 {
21 TestContext.WriteLine(str);
22 }
23
25 public string ReadLine()
26 {
27 throw new NotSupportedException();
28 }
29
31 public Task<string> ReadLineAsync()
32 {
33 return Task.Run(() => Console.ReadLine() ?? "");
34 }
35
37 public void Clear()
38 {
39 //Do nothing
40 }
41
43 public ConsoleColor ForegroundColor { get; set; }
44
46 public ConsoleColor BackgroundColor { get; set; }
47}
Implements a wrapper for the default NUnit console.
Task< string > ReadLineAsync()
Reads a line from the console asynchronously.The line that was read
void Write(string str)
Writes a string to the console.
string ReadLine()
Reads a line from the console.The line that was read
ConsoleColor ForegroundColor
The Foreground Color.
ConsoleColor BackgroundColor
The Background Color.
void WriteLine(string str)
Writes a string to the console and appends a newline.
Interface that abstracts the console.
Contains a Console Abstraction Layer to be able to Simulate Console Input/Output over the Network.
Definition BadConsole.cs:6
Contains NUnit Extensions and APIs for the BadScript2 Runtime.
Definition BadNUnitApi.cs:7