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/Services/ParseErrorServiceFixture.cs

31 lines
769 B

using System;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.Services
{
[TestFixture]
public class ParseErrorServiceFixture : SqlCeTest
{
public ParseErrorServiceFixture()
{
AppDomain.CurrentDomain.AssemblyResolve +=
new ResolveEventHandler(CurrentDomain_AssemblyResolve);
}
Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
var name = new AssemblyName(args.Name);
if (name.Name == "Newtonsoft.Json")
{
return typeof(Newtonsoft.Json.JsonSerializer).Assembly;
}
return null;
}
}
}