You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Core.Test/Framework/CoreTest.cs

42 lines
953 B

using System;
using System.IO;
using NUnit.Framework;
using NzbDrone.Core.Model.Notification;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.Framework
{
public abstract class CoreTest : TestBase
{
protected static ProgressNotification MockNotification
{
get
{
return new ProgressNotification("Mock notification");
}
}
protected static void ThrowException()
{
throw new ApplicationException("This is a message for test exception");
}
protected FileStream OpenRead(params string[] path)
{
return File.OpenRead(Path.Combine(path));
}
}
public abstract class CoreTest<TSubject> : CoreTest
{
[SetUp]
public void CoreTestSetup()
{
Subject = Mocker.Resolve<TSubject>();
}
protected TSubject Subject { get; set; }
}
}