-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move TestOutputProvider to separate file
- Loading branch information
1 parent
eb98f90
commit 780da87
Showing
2 changed files
with
47 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Stack.Infrastructure; | ||
using Xunit.Abstractions; | ||
|
||
namespace Stack.Tests.Helpers; | ||
|
||
public class TestOutputProvider(ITestOutputHelper testOutputHelper) : IOutputProvider | ||
{ | ||
public void Debug(string message) | ||
{ | ||
testOutputHelper.WriteLine($"DEBUG: {message}"); | ||
} | ||
|
||
public void Error(string message) | ||
{ | ||
testOutputHelper.WriteLine($"ERROR: {message}"); | ||
} | ||
|
||
public void Information(string message) | ||
{ | ||
testOutputHelper.WriteLine($"INFO: {message}"); | ||
} | ||
|
||
public void Rule(string message) | ||
{ | ||
testOutputHelper.WriteLine($"RULE: {message}"); | ||
} | ||
|
||
public void Status(string message, Action action) | ||
{ | ||
testOutputHelper.WriteLine($"STATUS: {message}"); | ||
action(); | ||
} | ||
|
||
public void Tree(string header, string[] items) | ||
{ | ||
testOutputHelper.WriteLine($"TREE: {header}"); | ||
foreach (var item in items) | ||
{ | ||
testOutputHelper.WriteLine($" {item}"); | ||
} | ||
} | ||
|
||
public void Warning(string message) | ||
{ | ||
testOutputHelper.WriteLine($"WARNING: {message}"); | ||
} | ||
} |