Upgrade to NUnit3
This commit is contained in:
parent
2fabe2d198
commit
edea488dbe
|
@ -128,3 +128,4 @@ output/*
|
||||||
._*
|
._*
|
||||||
|
|
||||||
_start
|
_start
|
||||||
|
_temp_*/**/*
|
||||||
|
|
4
build.sh
4
build.sh
|
@ -208,9 +208,9 @@ PackageTests()
|
||||||
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
|
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
|
||||||
|
|
||||||
if [ $runtime = "dotnet" ] ; then
|
if [ $runtime = "dotnet" ] ; then
|
||||||
$nuget install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
|
$nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
||||||
else
|
else
|
||||||
mono $nuget install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
|
mono $nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $outputFolder/*.dll $testPackageFolder
|
cp $outputFolder/*.dll $testPackageFolder
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
EXCLUDE="-exclude:Windows -include:IntegrationTest"
|
|
||||||
TESTDIR="."
|
|
||||||
NUNIT="$TESTDIR/NUnit.Runners.2.6.1/tools/nunit-console-x86.exe"
|
|
||||||
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Api.Result.xml $TESTDIR/NzbDrone.Api.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Core.Result.xml $TESTDIR/NzbDrone.Core.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Integration.Result.xml $TESTDIR/NzbDrone.Integration.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Common.Result.xml $TESTDIR/NzbDrone.Common.Test.dll
|
|
|
@ -46,9 +46,9 @@
|
||||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
@ -111,4 +111,4 @@
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
|
@ -3,6 +3,6 @@
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
|
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
<package id="ValueInjecter" version="2.3.3" targetFramework="net40" />
|
<package id="ValueInjecter" version="2.3.3" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -49,9 +49,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="NBuilder" version="3.0.1.1" />
|
<package id="NBuilder" version="3.0.1.1" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -50,9 +50,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
<package id="Selenium.Support" version="2.48.0" targetFramework="net40" />
|
<package id="Selenium.Support" version="2.48.0" targetFramework="net40" />
|
||||||
<package id="Selenium.WebDriver" version="2.48.0" targetFramework="net40" />
|
<package id="Selenium.WebDriver" version="2.48.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -89,7 +89,7 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||||
int hitCount = 0;
|
int hitCount = 0;
|
||||||
_cachedString = new Cached<string>();
|
_cachedString = new Cached<string>();
|
||||||
|
|
||||||
for (int i = 0; i < 100; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
_cachedString.Get("key", () =>
|
_cachedString.Get("key", () =>
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,7 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||||
return null;
|
return null;
|
||||||
}, TimeSpan.FromMilliseconds(300));
|
}, TimeSpan.FromMilliseconds(300));
|
||||||
|
|
||||||
Thread.Sleep(10);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
hitCount.Should().BeInRange(3, 6);
|
hitCount.Should().BeInRange(3, 6);
|
||||||
|
|
|
@ -49,9 +49,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|
|
@ -6,6 +6,7 @@ using NUnit.Framework;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
using NzbDrone.Test.Common.Categories;
|
||||||
|
|
||||||
namespace NzbDrone.Common.Test
|
namespace NzbDrone.Common.Test
|
||||||
{
|
{
|
||||||
|
@ -153,7 +154,7 @@ namespace NzbDrone.Common.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore]
|
[Ignore("Parent, not Grandparent")]
|
||||||
public void should_not_be_parent_when_it_is_grandparent()
|
public void should_not_be_parent_when_it_is_grandparent()
|
||||||
{
|
{
|
||||||
var path = Path.Combine(_parent, "parent", "child");
|
var path = Path.Combine(_parent, "parent", "child");
|
||||||
|
@ -222,6 +223,7 @@ namespace NzbDrone.Common.Test
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Explicit]
|
[Explicit]
|
||||||
|
[ManualTest]
|
||||||
public void get_actual_casing_should_return_original_casing_for_shares()
|
public void get_actual_casing_should_return_original_casing_for_shares()
|
||||||
{
|
{
|
||||||
var path = @"\\server\Pool\Apps";
|
var path = @"\\server\Pool\Apps";
|
||||||
|
|
|
@ -31,10 +31,21 @@ namespace NzbDrone.Common.Test
|
||||||
[TearDown]
|
[TearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
Process.GetProcessesByName(DummyApp.DUMMY_PROCCESS_NAME).ToList().ForEach(c => c.Kill());
|
Process.GetProcessesByName(DummyApp.DUMMY_PROCCESS_NAME).ToList().ForEach(c =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
c.Kill();
|
||||||
|
}
|
||||||
|
catch (Win32Exception ex)
|
||||||
|
{
|
||||||
|
TestLogger.Warn(ex, "{0} when killing process", ex.Message);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void GetById_should_return_null_if_process_doesnt_exist()
|
public void GetById_should_return_null_if_process_doesnt_exist()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
using NzbDrone.Test.Common.Categories;
|
||||||
|
|
||||||
namespace NzbDrone.Common.Test
|
namespace NzbDrone.Common.Test
|
||||||
{
|
{
|
||||||
|
@ -13,7 +15,6 @@ namespace NzbDrone.Common.Test
|
||||||
private const string ALWAYS_INSTALLED_SERVICE = "SCardSvr"; //Smart Card
|
private const string ALWAYS_INSTALLED_SERVICE = "SCardSvr"; //Smart Card
|
||||||
private const string TEMP_SERVICE_NAME = "NzbDrone_Nunit";
|
private const string TEMP_SERVICE_NAME = "NzbDrone_Nunit";
|
||||||
|
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
|
@ -24,8 +25,10 @@ namespace NzbDrone.Common.Test
|
||||||
[TearDown]
|
[TearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
WindowsOnly();
|
if (OsInfo.IsWindows)
|
||||||
CleanupService();
|
{
|
||||||
|
CleanupService();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,6 +73,7 @@ namespace NzbDrone.Common.Test
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Explicit]
|
[Explicit]
|
||||||
|
[ManualTest]
|
||||||
public void UnInstallService()
|
public void UnInstallService()
|
||||||
{
|
{
|
||||||
Subject.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
Subject.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||||
|
@ -78,6 +82,7 @@ namespace NzbDrone.Common.Test
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Explicit]
|
[Explicit]
|
||||||
|
[ManualTest]
|
||||||
public void Should_be_able_to_start_and_stop_service()
|
public void Should_be_able_to_start_and_stop_service()
|
||||||
{
|
{
|
||||||
Subject.GetService(ALWAYS_INSTALLED_SERVICE).Status
|
Subject.GetService(ALWAYS_INSTALLED_SERVICE).Status
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using FluentAssertions;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
|
@ -8,16 +9,16 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
|
||||||
{
|
{
|
||||||
public class SearchDefinitionFixture : CoreTest<SingleEpisodeSearchCriteria>
|
public class SearchDefinitionFixture : CoreTest<SingleEpisodeSearchCriteria>
|
||||||
{
|
{
|
||||||
[TestCase("Betty White's Off Their Rockers", Result = "Betty+Whites+Off+Their+Rockers")]
|
[TestCase("Betty White's Off Their Rockers", "Betty+Whites+Off+Their+Rockers")]
|
||||||
[TestCase("Star Wars: The Clone Wars", Result = "Star+Wars+The+Clone+Wars")]
|
[TestCase("Star Wars: The Clone Wars", "Star+Wars+The+Clone+Wars")]
|
||||||
[TestCase("Hawaii Five-0", Result = "Hawaii+Five+0")]
|
[TestCase("Hawaii Five-0", "Hawaii+Five+0")]
|
||||||
[TestCase("Franklin & Bash", Result = "Franklin+and+Bash")]
|
[TestCase("Franklin & Bash", "Franklin+and+Bash")]
|
||||||
[TestCase("Chicago P.D.", Result = "Chicago+PD")]
|
[TestCase("Chicago P.D.", "Chicago+PD")]
|
||||||
[TestCase("Kourtney And Khlo\u00E9 Take The Hamptons", Result = "Kourtney+And+Khloe+Take+The+Hamptons")]
|
[TestCase("Kourtney And Khlo\u00E9 Take The Hamptons", "Kourtney+And+Khloe+Take+The+Hamptons")]
|
||||||
public string should_replace_some_special_characters(string input)
|
public void should_replace_some_special_characters(string input, string expected)
|
||||||
{
|
{
|
||||||
Subject.SceneTitles = new List<string> { input };
|
Subject.SceneTitles = new List<string> { input };
|
||||||
return Subject.QueryTitles.First();
|
Subject.QueryTitles.First().Should().Be(expected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.Instrumentation;
|
using NzbDrone.Core.Instrumentation;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
using NzbDrone.Test.Common.Categories;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.InstrumentationTests
|
namespace NzbDrone.Core.Test.InstrumentationTests
|
||||||
{
|
{
|
||||||
|
@ -68,6 +69,7 @@ namespace NzbDrone.Core.Test.InstrumentationTests
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Explicit]
|
[Explicit]
|
||||||
|
[ManualTest]
|
||||||
public void perf_test()
|
public void perf_test()
|
||||||
{
|
{
|
||||||
MapRepository.Instance.EnableTraceLogging = false;
|
MapRepository.Instance.EnableTraceLogging = false;
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
using NzbDrone.Core.Notifications.Prowl;
|
using NzbDrone.Core.Notifications.Prowl;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
using NzbDrone.Test.Common.Categories;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.NotificationTests
|
namespace NzbDrone.Core.Test.NotificationTests
|
||||||
{
|
{
|
||||||
[Explicit]
|
[Explicit]
|
||||||
|
[ManualTest]
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class ProwlProviderTest : CoreTest<ProwlService>
|
public class ProwlProviderTest : CoreTest<ProwlService>
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,9 +72,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<package id="NCrunch.Framework" version="1.46.0.9" targetFramework="net40" />
|
<package id="NCrunch.Framework" version="1.46.0.9" targetFramework="net40" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
<package id="Prowlin" version="0.9.4456.26422" targetFramework="net40" />
|
<package id="Prowlin" version="0.9.4456.26422" targetFramework="net40" />
|
||||||
<package id="Unity" version="2.1.505.2" targetFramework="net40" />
|
<package id="Unity" version="2.1.505.2" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -8,7 +8,7 @@ using RestSharp;
|
||||||
namespace NzbDrone.Integration.Test
|
namespace NzbDrone.Integration.Test
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
[Ignore]
|
[Ignore("Command integration tests are bad, maybe?")]
|
||||||
public class CommandIntegrationTest : IntegrationTest
|
public class CommandIntegrationTest : IntegrationTest
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -80,9 +80,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestSharp, Version=105.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RestSharp, Version=105.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<package id="Nancy.Owin" version="0.23.2" targetFramework="net40" />
|
<package id="Nancy.Owin" version="0.23.2" targetFramework="net40" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net40" />
|
<package id="Owin" version="1.0" targetFramework="net40" />
|
||||||
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
|
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -50,9 +50,9 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
@ -95,4 +95,4 @@
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
|
@ -2,5 +2,5 @@
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -62,9 +62,9 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\Libraries\Mono.Posix.dll</HintPath>
|
<HintPath>..\Libraries\Mono.Posix.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
@ -120,4 +120,4 @@
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -0,0 +1,13 @@
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace NzbDrone.Test.Common.Categories
|
||||||
|
{
|
||||||
|
public class ManualTestAttribute : CategoryAttribute
|
||||||
|
{
|
||||||
|
public ManualTestAttribute()
|
||||||
|
: base("ManualTest")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ using NLog;
|
||||||
using NLog.Config;
|
using NLog.Config;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using NUnit.Framework.Interfaces;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Common.Instrumentation;
|
using NzbDrone.Common.Instrumentation;
|
||||||
|
@ -49,7 +50,7 @@ namespace NzbDrone.Test.Common
|
||||||
{
|
{
|
||||||
//can't use because of a bug in mono with 2.6.2,
|
//can't use because of a bug in mono with 2.6.2,
|
||||||
//https://bugs.launchpad.net/nunitv2/+bug/1076932
|
//https://bugs.launchpad.net/nunitv2/+bug/1076932
|
||||||
if (BuildInfo.IsDebug && TestContext.CurrentContext.Result.State == TestState.Success)
|
if (BuildInfo.IsDebug && TestContext.CurrentContext.Result.Outcome == ResultState.Success)
|
||||||
{
|
{
|
||||||
ExceptionVerification.AssertNoUnexpectedLogs();
|
ExceptionVerification.AssertNoUnexpectedLogs();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestSharp, Version=105.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RestSharp, Version=105.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
@ -86,6 +86,7 @@
|
||||||
<Compile Include="AutoMoq\Unity\AutoMockingBuilderStrategy.cs" />
|
<Compile Include="AutoMoq\Unity\AutoMockingBuilderStrategy.cs" />
|
||||||
<Compile Include="AutoMoq\Unity\AutoMockingContainerExtension.cs" />
|
<Compile Include="AutoMoq\Unity\AutoMockingContainerExtension.cs" />
|
||||||
<Compile Include="Categories\DiskAccessTestAttribute.cs" />
|
<Compile Include="Categories\DiskAccessTestAttribute.cs" />
|
||||||
|
<Compile Include="Categories\ManualTestAttribute.cs" />
|
||||||
<Compile Include="Categories\IntegrationTestAttribute.cs" />
|
<Compile Include="Categories\IntegrationTestAttribute.cs" />
|
||||||
<Compile Include="ConcurrencyCounter.cs" />
|
<Compile Include="ConcurrencyCounter.cs" />
|
||||||
<Compile Include="ExceptionVerification.cs" />
|
<Compile Include="ExceptionVerification.cs" />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
|
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
|
||||||
<package id="Unity" version="2.1.505.2" targetFramework="net40" />
|
<package id="Unity" version="2.1.505.2" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -49,9 +49,9 @@
|
||||||
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.0-rc1\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="NBuilder" version="3.0.1.1" />
|
<package id="NBuilder" version="3.0.1.1" />
|
||||||
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
<package id="NLog" version="4.3.0-rc1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -58,8 +58,9 @@
|
||||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework">
|
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
@ -115,4 +116,4 @@
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
||||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
|
@ -0,0 +1,44 @@
|
||||||
|
PLATFORM=$1
|
||||||
|
TYPE=$2
|
||||||
|
WHERE="cat != ManualTest"
|
||||||
|
TEST_DIR="."
|
||||||
|
TEST_PATTERN="*Test.dll"
|
||||||
|
ASSEMBLIES=""
|
||||||
|
|
||||||
|
if [ -d "$TEST_DIR/_tests" ]; then
|
||||||
|
TEST_DIR="$TEST_DIR/_tests"
|
||||||
|
fi
|
||||||
|
|
||||||
|
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.2.0/tools/nunit3-console.exe"
|
||||||
|
NUNIT_COMMAND="$NUNIT"
|
||||||
|
NUNIT_PARAMS="--teamcity"
|
||||||
|
|
||||||
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
|
WHERE="$WHERE && cat != LINUX"
|
||||||
|
elif [ "$PLATFORM" = "Linux" ]; then
|
||||||
|
WHERE="$WHERE && cat != WINDOWS"
|
||||||
|
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
||||||
|
elif [ "$PLATFORM" = "Mac" ]; then
|
||||||
|
WHERE="$WHERE && cat != WINDOWS"
|
||||||
|
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
||||||
|
else
|
||||||
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TYPE" = "Unit" ]; then
|
||||||
|
WHERE="$WHERE && cat != IntegrationTest && cat != AutomationTest"
|
||||||
|
elif [ "$TYPE" = "Integration" ] || [ "$TYPE" = "int" ] ; then
|
||||||
|
WHERE="$WHERE && cat == IntegrationTest"
|
||||||
|
elif [ "$TYPE" = "Automation" ] ; then
|
||||||
|
WHERE="$WHERE && cat == AutomationTest"
|
||||||
|
else
|
||||||
|
echo "Type must be provided as second argument: Unit, Integration or Automation"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in `find $TEST_DIR -name "$TEST_PATTERN"`;
|
||||||
|
do ASSEMBLIES="$ASSEMBLIES $i"
|
||||||
|
done
|
||||||
|
|
||||||
|
$NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES;
|
|
@ -1,10 +0,0 @@
|
||||||
EXCLUDE="-exclude:Windows,IntegrationTest"
|
|
||||||
TESTDIR="."
|
|
||||||
NUNIT="$TESTDIR/NUnit.Runners.2.6.1/tools/nunit-console-x86.exe"
|
|
||||||
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Api.Result.xml $TESTDIR/NzbDrone.Api.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Common.Result.xml $TESTDIR/NzbDrone.Common.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Core.Result.xml $TESTDIR/NzbDrone.Core.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Host.Result.xml $TESTDIR/NzbDrone.Host.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Libraries.Result.xml $TESTDIR/NzbDrone.Libraries.Test.dll
|
|
||||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Mono.Result.xml $TESTDIR/NzbDrone.Mono.Test.dll
|
|
Loading…
Reference in New Issue