generated from dailydevops/dotnet-template
-
-
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.
- Loading branch information
Showing
7 changed files
with
271 additions
and
82 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
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
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
41 changes: 41 additions & 0 deletions
41
tests/NetEvolve.Logging.XUnit.Tests.Unit/XUnitLoggerOfTTests.cs
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,41 @@ | ||
namespace NetEvolve.Logging.XUnit.Tests.Unit; | ||
|
||
using System; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
public partial class XUnitLoggerOfTTests | ||
{ | ||
[Fact] | ||
public void Constructor_WithMessageSinkNull_ThrowArgumentNullException() | ||
{ | ||
IMessageSink messageSink = null!; | ||
|
||
_ = Assert.Throws<ArgumentNullException>( | ||
"messageSink", | ||
() => _ = new XUnitLogger<XUnitLoggerOfTTests>(messageSink, null!, null!, null!) | ||
); | ||
} | ||
|
||
[Fact] | ||
public void Constructor_WithTestOutputHelperNull_ThrowArgumentNullException() | ||
{ | ||
ITestOutputHelper testOutputHelper = null!; | ||
|
||
_ = Assert.Throws<ArgumentNullException>( | ||
"testOutputHelper", | ||
() => _ = new XUnitLogger<XUnitLoggerOfTTests>(testOutputHelper, null!, null!, null!) | ||
); | ||
} | ||
|
||
[Fact] | ||
public void Constructor_WithWriteToActionNull_ThrowArgumentNullException() | ||
{ | ||
Action<string> writeToAction = null!; | ||
|
||
_ = Assert.Throws<ArgumentNullException>( | ||
"writeToAction", | ||
() => _ = new XUnitLogger<XUnitLoggerOfTTests>(writeToAction, null!, null!, null!) | ||
); | ||
} | ||
} |
Oops, something went wrong.