cleaned up refresh series a bit.

This commit is contained in:
Keivan Beigi 2013-07-31 19:02:36 -07:00
commit 4e7468e6fe
14 changed files with 190 additions and 135 deletions

View file

@ -51,6 +51,10 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.5.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=2.0.1.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NLog.2.0.1.2\lib\net40\NLog.dll</HintPath>
@ -76,6 +80,7 @@
<Compile Include="Categories\IntegrationTestAttribute.cs" />
<Compile Include="LoggingTest.cs" />
<Compile Include="MockerExtensions.cs" />
<Compile Include="ObjectExtentions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReflectionExtensions.cs" />
<Compile Include="StringExtensions.cs" />

View file

@ -0,0 +1,13 @@
using Newtonsoft.Json;
namespace NzbDrone.Test.Common
{
public static class ObjectExtentions
{
public static T JsonClone<T>(this T source)
{
var json = JsonConvert.SerializeObject(source);
return JsonConvert.DeserializeObject<T>(json);
}
}
}

View file

@ -1,4 +1,5 @@
using System.IO;
using Newtonsoft.Json.Serialization;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Test.Common

View file

@ -3,6 +3,7 @@
<package id="CommonServiceLocator" version="1.0" />
<package id="FluentAssertions" version="2.0.1" targetFramework="net40" />
<package id="Moq" version="4.0.10827" />
<package id="Newtonsoft.Json" version="5.0.3" targetFramework="net40" />
<package id="NLog" version="2.0.1.2" targetFramework="net40" />
<package id="NUnit" version="2.6.2" targetFramework="net40" />
<package id="Unity" version="2.1.505.2" targetFramework="net40" />