forked from xunit/xunit
-
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.
Emit diagnostic message when unable to load config
* Adds proxy for ConfigReader to enable mock injection * Modifies xunit to emit diagnostic message per assembly Fixes xunit#1655
- Loading branch information
1 parent
f71b2c5
commit 19c236c
Showing
3 changed files
with
76 additions
and
5 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
19 changes: 19 additions & 0 deletions
19
src/xunit.v3.runner.utility/Configuration/ConfigReaderProxy.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,19 @@ | ||
namespace Xunit.Runner.Common | ||
{ | ||
/// <summary> | ||
/// This class is a simple proxy for ConfigReader allowing for dependency injection. | ||
/// </summary> | ||
public class _ConfigReaderProxy | ||
{ | ||
/// <summary> | ||
/// Proxies calls to ConfigReader.Load | ||
/// </summary> | ||
public virtual bool Load( | ||
TestAssemblyConfiguration configuration, | ||
string? assemblyFileName, | ||
string? configFileName = null) | ||
{ | ||
return ConfigReader.Load(configuration, assemblyFileName, configFileName); | ||
} | ||
} | ||
} |