Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/blame/commit/93481728cc95fb01e49bca0b89870d06dbf85403/NzbDrone.Core.Test/Framework/TestBaseTests.cs
You should set ROOT_URL correctly, otherwise the web may not work correctly.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using NLog;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.Framework.AutoMoq
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
class TestBaseTests : TestBase
|
|
|
|
|
{
|
|
|
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_no_exceptions_are_logged()
|
|
|
|
|
{
|
|
|
|
|
Logger.Info("Everything is fine and dandy!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_errors_are_excpected()
|
|
|
|
|
{
|
|
|
|
|
Logger.Error("I knew this would happer");
|
|
|
|
|
ExceptionVerification.ExcpectedErrors(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_warns_are_excpected()
|
|
|
|
|
{
|
|
|
|
|
Logger.Warn("I knew this would happer");
|
|
|
|
|
ExceptionVerification.ExcpectedWarns(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_warns_are_ignored()
|
|
|
|
|
{
|
|
|
|
|
Logger.Warn("I knew this would happer");
|
|
|
|
|
Logger.Warn("I knew this would happer");
|
|
|
|
|
Logger.Warn("I knew this would happer");
|
|
|
|
|
ExceptionVerification.IgnoreWarns();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_errors_are_ignored()
|
|
|
|
|
{
|
|
|
|
|
Logger.Error("I knew this would happer");
|
|
|
|
|
Logger.Error("I knew this would happer");
|
|
|
|
|
Logger.Error("I knew this would happer");
|
|
|
|
|
ExceptionVerification.IgnoreErrors();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void Test_should_pass_when_exception_type_is_ignored()
|
|
|
|
|
{
|
|
|
|
|
Logger.ErrorException("bad exception", new WebException("Test"));
|
|
|
|
|
ExceptionVerification.MarkInconclusive(typeof(WebException));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|