mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
adding support for running integration tests using packaged build.
This commit is contained in:
@@ -2,15 +2,20 @@ using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Test.Common
|
||||
{
|
||||
public abstract class LoggingTest
|
||||
{
|
||||
protected Logger TestLogger = LogManager.GetLogger("TestLogger");
|
||||
protected static Logger TestLogger;
|
||||
|
||||
protected static void InitLogging()
|
||||
{
|
||||
new StartupArguments();
|
||||
|
||||
TestLogger = LogManager.GetLogger("TestLogger");
|
||||
|
||||
if (LogManager.Configuration == null || LogManager.Configuration is XmlLoggingConfiguration)
|
||||
{
|
||||
LogManager.Configuration = new LoggingConfiguration();
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace NzbDrone.Test.Common
|
||||
|
||||
Mocker.SetConstant(LogManager.GetLogger("TestLogger"));
|
||||
|
||||
Mocker.SetConstant(new StartupArguments(new string[0]));
|
||||
Mocker.SetConstant<IStartupArguments>(new StartupArguments(new string[0]));
|
||||
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user