Merge pull request #66 from nunit/prepare-for-1-3
Prepare for 2.0, merged
This commit is contained in:
Коммит
d88be782da
Двоичные данные
NUnitTestAdapter.sln
Двоичные данные
NUnitTestAdapter.sln
Двоичный файл не отображается.
Двоичные данные
lib/mock-assembly.dll
Двоичные данные
lib/mock-assembly.dll
Двоичный файл не отображается.
Двоичные данные
lib/nunit.core.dll
Двоичные данные
lib/nunit.core.dll
Двоичный файл не отображается.
Двоичные данные
lib/nunit.core.interfaces.dll
Двоичные данные
lib/nunit.core.interfaces.dll
Двоичный файл не отображается.
Двоичные данные
lib/nunit.framework.dll
Двоичные данные
lib/nunit.framework.dll
Двоичный файл не отображается.
Двоичные данные
lib/nunit.util.dll
Двоичные данные
lib/nunit.util.dll
Двоичный файл не отображается.
|
@ -10,11 +10,11 @@
|
|||
<projectUrl>http://nunit.org/index.php?p=vsTestAdapter&r=2.6</projectUrl>
|
||||
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>A package including the NUnit TestAdapter for Visual Studio 2012/13. With this package you don't need to install the VSIX adapter package, and you don't need to upload the adapter to your TFS server.
|
||||
<description>A package including the NUnit TestAdapter for Visual Studio 2012/13/15. With this package you don't need to install the VSIX adapter package, and you don't need to upload the adapter to your TFS server.
|
||||
Note that this package ONLY contains the adapter, not the NUnit framework. You must also get the framework, or use the NUnitTestAdapter.WithFramework nuget package.
|
||||
You only need one such package for a solution.
|
||||
The package works with Visual Studio 2012 from RTM, and with Update 1 and higher, and with Visual Studio 2013 from RTM, and tested up to Update 2 RC.</description>
|
||||
<releaseNotes>Updated to NUnit 2.6.3, Misc bug fixes</releaseNotes>
|
||||
The package works with Visual Studio 2012 from RTM, and all Updates, and with Visual Studio 2013 RTM and all updates, and Visual Studio 2015 tested up to CTP6</description>
|
||||
<releaseNotes>Updated to NUnit 2.6.4, Support for VS 2015, Misc bug fixes</releaseNotes>
|
||||
<copyright>NUnit Software</copyright>
|
||||
<language>en-US</language>
|
||||
<tags>test visualstudio testadapter</tags>
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
<metadata>
|
||||
<id>NUnitTestAdapter.WithFramework</id>
|
||||
<version>${package.version}</version>
|
||||
<title>NUnit TestAdapter including NUnit 2.6.3 framework</title>
|
||||
<title>NUnit TestAdapter including NUnit 2.6.4 framework</title>
|
||||
<authors>NUnit Software</authors>
|
||||
<owners>NUnit Software</owners>
|
||||
<licenseUrl>http://visualstudiogallery.msdn.microsoft.com/site/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d/eula?licenseType=None</licenseUrl>
|
||||
<projectUrl>http://nunit.org/index.php?p=vsTestAdapter&r=2.6</projectUrl>
|
||||
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>A package including the NUnit test frameworks and the Visual Studio 2012/13 test adapter. With this package you don't need to install the VSIX adapter package, and you don't need to upload the adapter to your TFS server.
|
||||
Note that this package also contains the NUnit framework.
|
||||
The package works with Visual Studio 2012 from RTM, and all Updates, and with Visual Studio 2013 RTM, tested to Update 2 RC.</description>
|
||||
<releaseNotes>Updated to NUnit 2.6.3, Misc bug fixes</releaseNotes>
|
||||
<description>
|
||||
A package including the NUnit test frameworks and the Visual Studio 2012/13 test adapter. With this package you don't need to install the VSIX adapter package, and you don't need to upload the adapter to your TFS server.
|
||||
Note that this package also contains the NUnit framework.
|
||||
The package works with Visual Studio 2012 from RTM, and all Updates, and with Visual Studio 2013 RTM and all updates, and Visual Studio 2015 tested up to CTP6
|
||||
</description>
|
||||
<releaseNotes>Updated to NUnit 2.6.4, Support for VS 2015, Misc bug fixes</releaseNotes>
|
||||
<copyright>NUnit Software</copyright>
|
||||
<language>en-US</language>
|
||||
<tags>test visualstudio testadapter</tags>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
|
||||
<!-- Set version number for package -->
|
||||
<property name="package.version" value="1.2"/>
|
||||
<property name="package.version" value="2.0.0"/>
|
||||
|
||||
<!-- Define package name, including version -->
|
||||
<property name="package.base.name" value="NUnitVisualStudioTestAdapter"/>
|
||||
|
@ -33,78 +33,78 @@
|
|||
<target name="test" description="Test the adapter (NYI)"/>
|
||||
|
||||
<target name="package" desciption="Package the adapter"
|
||||
depends="package-vsix,package-zip,package-nuget-1,package-nuget-2"/>
|
||||
depends="package-vsix,package-zip,package-nuget-1,package-nuget-2"/>
|
||||
|
||||
<target name="package-vsix">
|
||||
|
||||
<!-- Copy the vsix package, built by Visual Studio. -->
|
||||
<property name="source.vsix.file" value="NUnitTestAdapter.vsix"/>
|
||||
<property name="target.vsix.file" value="${package.name}.vsix"/>
|
||||
<copy file="${path::combine(install.release.dir, source.vsix.file)}"
|
||||
tofile="${path::combine(project.package.dir, target.vsix.file)}"/>
|
||||
|
||||
</target>
|
||||
<target name="package-vsix">
|
||||
|
||||
<!-- Copy the vsix package, built by Visual Studio. -->
|
||||
<property name="source.vsix.file" value="NUnitTestAdapter.vsix"/>
|
||||
<property name="target.vsix.file" value="${package.name}.vsix"/>
|
||||
<copy file="${path::combine(install.release.dir, source.vsix.file)}"
|
||||
tofile="${path::combine(project.package.dir, target.vsix.file)}"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="package-zip">
|
||||
<target name="package-zip">
|
||||
|
||||
<!-- Create the working directory -->
|
||||
<mkdir dir="${package.working.dir}"/>
|
||||
<!-- Create the working directory -->
|
||||
<mkdir dir="${package.working.dir}"/>
|
||||
|
||||
<!-- Copy binaries to the working directory for zipping. -->
|
||||
<copy todir="${package.working.dir}">
|
||||
<fileset basedir="${install.release.dir}">
|
||||
<include name="NUnit.VisualStudio.TestAdapter.dll"/>
|
||||
<include name="nunit.util.dll"/>
|
||||
<include name="nunit.core.dll"/>
|
||||
<include name="nunit.core.interfaces.dll"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<!-- Copy binaries to the working directory for zipping. -->
|
||||
<copy todir="${package.working.dir}">
|
||||
<fileset basedir="${install.release.dir}">
|
||||
<include name="NUnit.VisualStudio.TestAdapter.dll"/>
|
||||
<include name="nunit.util.dll"/>
|
||||
<include name="nunit.core.dll"/>
|
||||
<include name="nunit.core.interfaces.dll"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- Create the zip package -->
|
||||
<property name="zip.file.name" value="${package.name}.zip"/>
|
||||
<zip ziplevel="9"
|
||||
zipfile="${project.package.dir}/${zip.file.name}">
|
||||
<fileset basedir="${package.working.dir}" prefix="${package.name}">
|
||||
<include name="**"/>
|
||||
</fileset>
|
||||
</zip>
|
||||
<!-- Create the zip package -->
|
||||
<property name="zip.file.name" value="${package.name}.zip"/>
|
||||
<zip ziplevel="9"
|
||||
zipfile="${project.package.dir}/${zip.file.name}">
|
||||
<fileset basedir="${package.working.dir}" prefix="${package.name}">
|
||||
<include name="**"/>
|
||||
</fileset>
|
||||
</zip>
|
||||
|
||||
</target>
|
||||
</target>
|
||||
|
||||
<target name="package-nuget-1">
|
||||
<target name="package-nuget-1">
|
||||
|
||||
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/>
|
||||
<property name="nuget.internal.id" value="NUnitTestAdapter"/>
|
||||
<call target="create-nuget-package"/>
|
||||
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/>
|
||||
<property name="nuget.internal.id" value="NUnitTestAdapter"/>
|
||||
<call target="create-nuget-package"/>
|
||||
|
||||
</target>
|
||||
</target>
|
||||
|
||||
<target name="package-nuget-2">
|
||||
<target name="package-nuget-2">
|
||||
|
||||
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapterAndFramework"/>
|
||||
<property name="nuget.internal.id" value="NUnitTestAdapter.WithFramework"/>
|
||||
<call target="create-nuget-package"/>
|
||||
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapterAndFramework"/>
|
||||
<property name="nuget.internal.id" value="NUnitTestAdapter.WithFramework"/>
|
||||
<call target="create-nuget-package"/>
|
||||
|
||||
</target>
|
||||
</target>
|
||||
|
||||
<target name="create-nuget-package">
|
||||
|
||||
<copy file="${project.nuget.dir}/${nuget.package.name}.nuspec"
|
||||
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nuspec"
|
||||
overwrite="true">
|
||||
<filterchain>
|
||||
<expandproperties/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<target name="create-nuget-package">
|
||||
|
||||
<copy file="${project.nuget.dir}/${nuget.package.name}.nuspec"
|
||||
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nuspec"
|
||||
overwrite="true">
|
||||
<filterchain>
|
||||
<expandproperties/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
||||
<exec program="NuGet.exe"
|
||||
workingdir="${project.package.dir}"
|
||||
commandline="pack ${nuget.package.name}-${package.version}.nuspec" />
|
||||
<exec program="NuGet.exe"
|
||||
workingdir="${project.package.dir}"
|
||||
commandline="pack ${nuget.package.name}-${package.version}.nuspec" />
|
||||
|
||||
<move file="${project.package.dir}/${nuget.internal.id}.${package.version}.nupkg"
|
||||
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nupkg"/>
|
||||
<move file="${project.package.dir}/${nuget.internal.id}.${package.version}.nupkg"
|
||||
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nupkg"/>
|
||||
|
||||
</target>
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
|
@ -30,22 +30,24 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
private TestFilter nunitFilter;
|
||||
private readonly List<TestCase> loadedTestCases;
|
||||
private readonly TestConverter testConverter;
|
||||
private INUnitTestAdapter NUnitTestAdapter { get; set; }
|
||||
|
||||
#region Constructors
|
||||
|
||||
// This constructor is called by the others and is used directly for testing
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName)
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName, INUnitTestAdapter nunitTestAdapter)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.assemblyName = assemblyName;
|
||||
testConverter = new TestConverter(logger, assemblyName);
|
||||
loadedTestCases = new List<TestCase>();
|
||||
nunitFilter = TestFilter.Empty;
|
||||
NUnitTestAdapter = nunitTestAdapter;
|
||||
}
|
||||
|
||||
// This constructor is used when the executor is called with a list of test cases
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName, IEnumerable<TestCase> selectedTestCases)
|
||||
: this(logger, assemblyName)
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName, IEnumerable<TestCase> selectedTestCases, INUnitTestAdapter nunitTestAdapter)
|
||||
: this(logger, assemblyName, nunitTestAdapter)
|
||||
{
|
||||
nunitFilter = MakeTestFilter(selectedTestCases);
|
||||
}
|
||||
|
@ -53,8 +55,8 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
private readonly ITfsTestFilter tfsFilter;
|
||||
|
||||
// This constructor is used when the executor is called with a list of assemblies
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName, ITfsTestFilter tfsFilter)
|
||||
: this(logger, assemblyName)
|
||||
public AssemblyRunner(TestLogger logger, string assemblyName, ITfsTestFilter tfsFilter, INUnitTestAdapter nunitTestAdapter)
|
||||
: this(logger, assemblyName, nunitTestAdapter)
|
||||
{
|
||||
this.tfsFilter = tfsFilter;
|
||||
}
|
||||
|
@ -155,9 +157,7 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
// future calls to convert a test case may now use the cache.
|
||||
private bool TryLoadAssembly()
|
||||
{
|
||||
var package = new TestPackage(assemblyName);
|
||||
package.Settings["ShadowCopyFiles"] = false;
|
||||
logger.SendDebugMessage("ShadowCopyFiles is set to :" + package.Settings["ShadowCopyFiles"]);
|
||||
var package = NUnitTestAdapter.CreateTestPackage(assemblyName);
|
||||
if (!runner.Load(package))
|
||||
return false;
|
||||
logger.SendMessage(TestMessageLevel.Informational,string.Format("Loading tests from {0}",package.FullName));
|
||||
|
|
|
@ -5,15 +5,21 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using NUnit.Core;
|
||||
using NUnit.Util;
|
||||
|
||||
namespace NUnit.VisualStudio.TestAdapter
|
||||
{
|
||||
public interface INUnitTestAdapter
|
||||
{
|
||||
TestPackage CreateTestPackage(string sourceAssembly);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NUnitTestAdapter is the common base for the
|
||||
/// NUnit discoverer and executor classes.
|
||||
/// </summary>
|
||||
public abstract class NUnitTestAdapter
|
||||
public abstract class NUnitTestAdapter : INUnitTestAdapter
|
||||
{
|
||||
// Our logger used to display messages
|
||||
protected TestLogger TestLog;
|
||||
|
@ -21,9 +27,9 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
private readonly string adapterVersion;
|
||||
|
||||
protected bool UseVsKeepEngineRunning { get; private set; }
|
||||
protected bool ShadowCopy { get; private set; }
|
||||
public bool ShadowCopy { get; private set; }
|
||||
|
||||
protected int Verbosity { get; private set; }
|
||||
public int Verbosity { get; private set; }
|
||||
|
||||
|
||||
protected bool RegistryFailure { get; set; }
|
||||
|
@ -67,16 +73,18 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
|
||||
#region Protected Helper Methods
|
||||
|
||||
private const string Name = "NUnit VS Adapter";
|
||||
|
||||
protected void Info(string method, string function)
|
||||
{
|
||||
var msg = string.Format("NUnit {0} {1} is {2}", adapterVersion, method, function);
|
||||
var msg = string.Format("{0} {1} {2} is {3}",Name, adapterVersion, method, function);
|
||||
TestLog.SendInformationalMessage(msg);
|
||||
}
|
||||
|
||||
protected void Debug(string method, string function)
|
||||
{
|
||||
#if DEBUG
|
||||
var msg = string.Format("NUnit {0} {1} is {2}", adapterVersion, method, function);
|
||||
var msg = string.Format("{0} {1} {2} is {3}", Name, adapterVersion, method, function);
|
||||
TestLog.SendDebugMessage(msg);
|
||||
#endif
|
||||
}
|
||||
|
@ -87,6 +95,16 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
ChannelServices.UnregisterChannel(chan);
|
||||
}
|
||||
|
||||
public TestPackage CreateTestPackage(string sourceAssembly)
|
||||
{
|
||||
var package = new TestPackage(sourceAssembly);
|
||||
package.Settings["ShadowCopyFiles"] = ShadowCopy;
|
||||
TestLog.SendDebugMessage("ShadowCopyFiles is set to :" + package.Settings["ShadowCopyFiles"]);
|
||||
return package;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -40,8 +40,7 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
TestLog.SendDebugMessage("Processing " + sourceAssembly);
|
||||
|
||||
TestRunner runner = new TestDomain();
|
||||
TestPackage package = new TestPackage(sourceAssembly);
|
||||
package.Settings["ShadowCopyFiles"] = ShadowCopy;
|
||||
var package = CreateTestPackage(sourceAssembly);
|
||||
TestConverter testConverter = null;
|
||||
try
|
||||
{
|
||||
|
@ -72,6 +71,10 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
// Attempts to load an invalid assembly, or an assembly with missing dependencies
|
||||
TestLog.LoadingAssemblyFailedWarning(ex.FileName, sourceAssembly);
|
||||
}
|
||||
catch (UnsupportedFrameworkException ex)
|
||||
{
|
||||
TestLog.UnsupportedFrameworkWarning(sourceAssembly);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
{
|
||||
sourceAssembly = Path.Combine(Environment.CurrentDirectory, sourceAssembly);
|
||||
}
|
||||
using (currentRunner = new AssemblyRunner(TestLog, sourceAssembly, tfsfilter))
|
||||
using (currentRunner = new AssemblyRunner(TestLog, sourceAssembly, tfsfilter,this))
|
||||
{
|
||||
currentRunner.RunAssembly(frameworkHandle);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
var assemblyGroups = tests.GroupBy(tc => tc.Source);
|
||||
foreach (var assemblyGroup in assemblyGroups)
|
||||
{
|
||||
using (currentRunner = new AssemblyRunner(TestLog, assemblyGroup.Key, assemblyGroup))
|
||||
using (currentRunner = new AssemblyRunner(TestLog, assemblyGroup.Key, assemblyGroup,this))
|
||||
{
|
||||
currentRunner.RunAssembly(frameworkHandle);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("NUnit Software")]
|
||||
[assembly: AssemblyProduct("NUnit.VisualStudio.TestAdapter")]
|
||||
[assembly: AssemblyCopyright("Copyright 2011-2014, NUnit Software")]
|
||||
[assembly: AssemblyCopyright("Copyright 2011-2015, NUnit Software")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: CLSCompliant(false)]
|
||||
|
@ -21,5 +21,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("c0aad5e4-b486-49bc-b3e8-31e01be6fefe")]
|
||||
[assembly: AssemblyVersion("1.2.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.0.1")]
|
||||
[assembly: AssemblyVersion("2.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.0.0")]
|
||||
|
|
|
@ -48,6 +48,11 @@ namespace NUnit.VisualStudio.TestAdapter
|
|||
SendWarningMessage("Dependent Assembly " + dependentAssembly + " of " + sourceAssembly + " not found. Can be ignored if not a NUnit project.");
|
||||
}
|
||||
|
||||
public void UnsupportedFrameworkWarning(string assembly)
|
||||
{
|
||||
SendWarningMessage("Attempt to load assembly with unsupported test framework in "+assembly);
|
||||
}
|
||||
|
||||
public void LoadingAssemblyFailedWarning(string dependentAssembly, string sourceAssembly)
|
||||
{
|
||||
SendWarningMessage("Assembly " + dependentAssembly + " loaded through " + sourceAssembly + " failed. Assembly is ignored. Correct deployment of dependencies if this is an error.");
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<Content Include="preview.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<None Include="source.extension.vsixmanifest">
|
||||
|
|
Двоичные данные
src/NUnitTestAdapterInstall/license.rtf
Двоичные данные
src/NUnitTestAdapterInstall/license.rtf
Двоичный файл не отображается.
Двоичные данные
src/NUnitTestAdapterInstall/preview.png
Двоичные данные
src/NUnitTestAdapterInstall/preview.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 16 KiB После Ширина: | Высота: | Размер: 37 KiB |
|
@ -3,10 +3,10 @@
|
|||
<Identifier Id="NUnitTestAdapterInstall..7c53286e-ac4f-485f-915c-5ec5a4c47b0c">
|
||||
<Name>NUnit Test Adapter</Name>
|
||||
<Author>Charlie Poole</Author>
|
||||
<Version>1.2.0.1</Version>
|
||||
<Description xml:space="preserve">NUnit adapter for integrated test execution under Visual Studio 2012 (all updates), Visual Studio 2013 (all updates), and the Visual Studio 2015 Preview and CTPs. Compatible with NUnit 2.0 through 2.6.3.</Description>
|
||||
<Version>2.0.0.0</Version>
|
||||
<Description xml:space="preserve">NUnit adapter for integrated test execution under Visual Studio 2012 (all updates), Visual Studio 2013 (all updates), and the Visual Studio 2015 Preview and CTPs. Compatible with NUnit 2.0 through 2.6.4.</Description>
|
||||
<Locale>1033</Locale>
|
||||
<MoreInfoUrl>http://nunit.org/index.php?p=vsTestAdapter&r=2.6.3</MoreInfoUrl>
|
||||
<MoreInfoUrl>http://nunit.org/index.php?p=vsTestAdapter&r=2.6.4</MoreInfoUrl>
|
||||
<License>license.rtf</License>
|
||||
<!--<GettingStartedGuide>http://nunit.org</GettingStartedGuide>-->
|
||||
<Icon>nunit_32x32.png</Icon>
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
var t1 = new TestCase(fakeTest1.TestName.FullName, ExecutorUri, "test");
|
||||
var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test");
|
||||
var list = new List<TestCase> {t1, t2};
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test", list);
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test", list,null);
|
||||
runner.AddTestCases(fakeTest1);
|
||||
runner.AddTestCases(fakeTest2);
|
||||
Assert.That(runner.NUnitFilter.IsEmpty, Is.False, "NUnitfilter should not be empty, we have added testcases");
|
||||
|
@ -58,7 +58,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
[Test]
|
||||
public void AddsNonFilteredCorrectly()
|
||||
{
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test");
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test",null);
|
||||
runner.AddTestCases(fakeTest1);
|
||||
runner.AddTestCases(fakeTest2);
|
||||
Assert.That(runner.NUnitFilter.IsEmpty, Is.True, "NUnitfilter has been touched");
|
||||
|
@ -69,7 +69,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
[Test]
|
||||
public void VerifyConstruction1()
|
||||
{
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test");
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test",null);
|
||||
Assert.That(runner.NUnitFilter.IsEmpty, Is.True);
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
var t1 = new TestCase(fakeTest1.TestName.FullName, ExecutorUri, "test");
|
||||
var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test");
|
||||
var list = new List<TestCase> {t1, t2};
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test", list);
|
||||
var runner = new AssemblyRunner(new TestLogger(), "test", list,null);
|
||||
Assert.False(runner.NUnitFilter.IsEmpty);
|
||||
Assert.That(runner.NUnitFilter, Is.TypeOf<SimpleNameFilter>());
|
||||
Assert.True(runner.NUnitFilter.Match(fakeTest1));
|
||||
|
|
|
@ -44,8 +44,9 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\mock-assembly.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq">
|
||||
<HintPath>..\..\packages\Moq.4.1.1309.1617\lib\net40\Moq.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.2.1502.911, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\Moq.4.2.1502.0911\lib\net40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -54,8 +55,9 @@
|
|||
<Reference Include="nunit.core.interfaces">
|
||||
<HintPath>..\..\lib\nunit.core.interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.util, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -92,9 +94,6 @@
|
|||
<ItemGroup>
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NUnitTestAdapter\NUnitTestAdapter.csproj">
|
||||
<Project>{8a85e26a-c706-48b1-bc36-06ebde3efd25}</Project>
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
var refNames = assembly.GetReferencedAssemblies().Where(ass => ass.Name == "nunit.core").ToList();
|
||||
Assert.IsTrue(refNames != null && refNames.Count() == 1, "No reference to Microsoft.VisualStudio.TestPlatform.ObjectModel found");
|
||||
var nunitVersion = refNames[0].Version;
|
||||
Assert.IsTrue(nunitVersion.Major==2 && nunitVersion.Minor==6 && nunitVersion.Build==3,"nunit must be of version 2.6.3");
|
||||
Assert.IsTrue(nunitVersion.Major==2 && nunitVersion.Minor==6 && nunitVersion.Build==4,"nunit must be of version 2.6.4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
|
||||
// Load the NUnit mock-assembly.dll once for this test, saving
|
||||
// the list of test cases sent to the discovery sink
|
||||
nunittestDiscoverer = ((ITestDiscoverer)new NUnitTestDiscoverer());
|
||||
nunittestDiscoverer = new NUnitTestDiscoverer();
|
||||
nunittestDiscoverer.DiscoverTests(new[] { MockAssemblyPath}, null, this, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.3.13283" newVersion="2.6.3.13283" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Moq" version="4.1.1309.1617" targetFramework="net45" />
|
||||
<package id="NUnit" version="2.6.3" targetFramework="net45" />
|
||||
<package id="Moq" version="4.2.1502.0911" targetFramework="net45" />
|
||||
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче