2012-02-05 06:34:36 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.Services
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2013-02-17 05:44:06 +00:00
|
|
|
|
public class ParseErrorServiceFixture : CoreTest
|
2012-02-05 06:34:36 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|