BadScript 2
Loading...
Searching...
No Matches
BadNUnitTestConsole.cs
Go to the documentation of this file.
2
3using NUnit.Framework;
4
6
11{
12#region IBadConsole Members
13
15 public void Write(string str)
16 {
17 TestContext.Write(str);
18 }
19
21 public void WriteLine(string str)
22 {
23 TestContext.WriteLine(str);
24 }
25
27 public string ReadLine()
28 {
29 throw new NotSupportedException();
30 }
31
33 public Task<string> ReadLineAsync()
34 {
35 return Task.Run(() => Console.ReadLine() ?? "");
36 }
37
39 public void Clear()
40 {
41 //Do nothing
42 }
43
45 public ConsoleColor ForegroundColor { get; set; }
46
48 public ConsoleColor BackgroundColor { get; set; }
49
50#endregion
51}
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