Merge pull request #66 from nunit/prepare-for-1-3

Prepare for 2.0, merged
This commit is contained in:
Terje Sandstrom 2015-04-01 21:52:57 +02:00
Родитель ac9825d2bf 2b2a287e72
Коммит d88be782da
25 изменённых файлов: 131 добавлений и 116 удалений

Двоичные данные
NUnitTestAdapter.sln

Двоичный файл не отображается.

Двоичные данные
lib/mock-assembly.dll

Двоичный файл не отображается.

Двоичные данные
lib/nunit.core.dll

Двоичный файл не отображается.

Двоичные данные
lib/nunit.core.interfaces.dll

Двоичный файл не отображается.

Двоичные данные
lib/nunit.framework.dll

Двоичный файл не отображается.

Двоичные данные
lib/nunit.util.dll

Двоичный файл не отображается.

Просмотреть файл

@ -10,11 +10,11 @@
<projectUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6</projectUrl> <projectUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6</projectUrl>
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl> <iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <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. 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. 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> 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.3, Misc bug fixes</releaseNotes> <releaseNotes>Updated to NUnit 2.6.4, Support for VS 2015, Misc bug fixes</releaseNotes>
<copyright>NUnit Software</copyright> <copyright>NUnit Software</copyright>
<language>en-US</language> <language>en-US</language>
<tags>test visualstudio testadapter</tags> <tags>test visualstudio testadapter</tags>

Просмотреть файл

@ -3,17 +3,19 @@
<metadata> <metadata>
<id>NUnitTestAdapter.WithFramework</id> <id>NUnitTestAdapter.WithFramework</id>
<version>${package.version}</version> <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> <authors>NUnit Software</authors>
<owners>NUnit Software</owners> <owners>NUnit Software</owners>
<licenseUrl>http://visualstudiogallery.msdn.microsoft.com/site/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d/eula?licenseType=None</licenseUrl> <licenseUrl>http://visualstudiogallery.msdn.microsoft.com/site/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d/eula?licenseType=None</licenseUrl>
<projectUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6</projectUrl> <projectUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6</projectUrl>
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl> <iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <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. <description>
Note that this package also contains the NUnit framework. 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.
The package works with Visual Studio 2012 from RTM, and all Updates, and with Visual Studio 2013 RTM, tested to Update 2 RC.</description> Note that this package also contains the NUnit framework.
<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> <copyright>NUnit Software</copyright>
<language>en-US</language> <language>en-US</language>
<tags>test visualstudio testadapter</tags> <tags>test visualstudio testadapter</tags>

Просмотреть файл

@ -7,7 +7,7 @@
<!-- Set version number for package --> <!-- 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 --> <!-- Define package name, including version -->
<property name="package.base.name" value="NUnitVisualStudioTestAdapter"/> <property name="package.base.name" value="NUnitVisualStudioTestAdapter"/>
@ -33,78 +33,78 @@
<target name="test" description="Test the adapter (NYI)"/> <target name="test" description="Test the adapter (NYI)"/>
<target name="package" desciption="Package the adapter" <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"> <target name="package-vsix">
<!-- Copy the vsix package, built by Visual Studio. --> <!-- Copy the vsix package, built by Visual Studio. -->
<property name="source.vsix.file" value="NUnitTestAdapter.vsix"/> <property name="source.vsix.file" value="NUnitTestAdapter.vsix"/>
<property name="target.vsix.file" value="${package.name}.vsix"/> <property name="target.vsix.file" value="${package.name}.vsix"/>
<copy file="${path::combine(install.release.dir, source.vsix.file)}" <copy file="${path::combine(install.release.dir, source.vsix.file)}"
tofile="${path::combine(project.package.dir, target.vsix.file)}"/> tofile="${path::combine(project.package.dir, target.vsix.file)}"/>
</target> </target>
<target name="package-zip"> <target name="package-zip">
<!-- Create the working directory --> <!-- Create the working directory -->
<mkdir dir="${package.working.dir}"/> <mkdir dir="${package.working.dir}"/>
<!-- Copy binaries to the working directory for zipping. --> <!-- Copy binaries to the working directory for zipping. -->
<copy todir="${package.working.dir}"> <copy todir="${package.working.dir}">
<fileset basedir="${install.release.dir}"> <fileset basedir="${install.release.dir}">
<include name="NUnit.VisualStudio.TestAdapter.dll"/> <include name="NUnit.VisualStudio.TestAdapter.dll"/>
<include name="nunit.util.dll"/> <include name="nunit.util.dll"/>
<include name="nunit.core.dll"/> <include name="nunit.core.dll"/>
<include name="nunit.core.interfaces.dll"/> <include name="nunit.core.interfaces.dll"/>
</fileset> </fileset>
</copy> </copy>
<!-- Create the zip package --> <!-- Create the zip package -->
<property name="zip.file.name" value="${package.name}.zip"/> <property name="zip.file.name" value="${package.name}.zip"/>
<zip ziplevel="9" <zip ziplevel="9"
zipfile="${project.package.dir}/${zip.file.name}"> zipfile="${project.package.dir}/${zip.file.name}">
<fileset basedir="${package.working.dir}" prefix="${package.name}"> <fileset basedir="${package.working.dir}" prefix="${package.name}">
<include name="**"/> <include name="**"/>
</fileset> </fileset>
</zip> </zip>
</target> </target>
<target name="package-nuget-1"> <target name="package-nuget-1">
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/> <property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/>
<property name="nuget.internal.id" value="NUnitTestAdapter"/> <property name="nuget.internal.id" value="NUnitTestAdapter"/>
<call target="create-nuget-package"/> <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.package.name" value="NUnitVisualStudioTestAdapterAndFramework"/>
<property name="nuget.internal.id" value="NUnitTestAdapter.WithFramework"/> <property name="nuget.internal.id" value="NUnitTestAdapter.WithFramework"/>
<call target="create-nuget-package"/> <call target="create-nuget-package"/>
</target> </target>
<target name="create-nuget-package"> <target name="create-nuget-package">
<copy file="${project.nuget.dir}/${nuget.package.name}.nuspec" <copy file="${project.nuget.dir}/${nuget.package.name}.nuspec"
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nuspec" tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nuspec"
overwrite="true"> overwrite="true">
<filterchain> <filterchain>
<expandproperties/> <expandproperties/>
</filterchain> </filterchain>
</copy> </copy>
<exec program="NuGet.exe" <exec program="NuGet.exe"
workingdir="${project.package.dir}" workingdir="${project.package.dir}"
commandline="pack ${nuget.package.name}-${package.version}.nuspec" /> commandline="pack ${nuget.package.name}-${package.version}.nuspec" />
<move file="${project.package.dir}/${nuget.internal.id}.${package.version}.nupkg" <move file="${project.package.dir}/${nuget.internal.id}.${package.version}.nupkg"
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nupkg"/> tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nupkg"/>
</target> </target>
</project> </project>

Просмотреть файл

@ -30,22 +30,24 @@ namespace NUnit.VisualStudio.TestAdapter
private TestFilter nunitFilter; private TestFilter nunitFilter;
private readonly List<TestCase> loadedTestCases; private readonly List<TestCase> loadedTestCases;
private readonly TestConverter testConverter; private readonly TestConverter testConverter;
private INUnitTestAdapter NUnitTestAdapter { get; set; }
#region Constructors #region Constructors
// This constructor is called by the others and is used directly for testing // 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.logger = logger;
this.assemblyName = assemblyName; this.assemblyName = assemblyName;
testConverter = new TestConverter(logger, assemblyName); testConverter = new TestConverter(logger, assemblyName);
loadedTestCases = new List<TestCase>(); loadedTestCases = new List<TestCase>();
nunitFilter = TestFilter.Empty; nunitFilter = TestFilter.Empty;
NUnitTestAdapter = nunitTestAdapter;
} }
// This constructor is used when the executor is called with a list of test cases // This constructor is used when the executor is called with a list of test cases
public AssemblyRunner(TestLogger logger, string assemblyName, IEnumerable<TestCase> selectedTestCases) public AssemblyRunner(TestLogger logger, string assemblyName, IEnumerable<TestCase> selectedTestCases, INUnitTestAdapter nunitTestAdapter)
: this(logger, assemblyName) : this(logger, assemblyName, nunitTestAdapter)
{ {
nunitFilter = MakeTestFilter(selectedTestCases); nunitFilter = MakeTestFilter(selectedTestCases);
} }
@ -53,8 +55,8 @@ namespace NUnit.VisualStudio.TestAdapter
private readonly ITfsTestFilter tfsFilter; private readonly ITfsTestFilter tfsFilter;
// This constructor is used when the executor is called with a list of assemblies // This constructor is used when the executor is called with a list of assemblies
public AssemblyRunner(TestLogger logger, string assemblyName, ITfsTestFilter tfsFilter) public AssemblyRunner(TestLogger logger, string assemblyName, ITfsTestFilter tfsFilter, INUnitTestAdapter nunitTestAdapter)
: this(logger, assemblyName) : this(logger, assemblyName, nunitTestAdapter)
{ {
this.tfsFilter = tfsFilter; this.tfsFilter = tfsFilter;
} }
@ -155,9 +157,7 @@ namespace NUnit.VisualStudio.TestAdapter
// future calls to convert a test case may now use the cache. // future calls to convert a test case may now use the cache.
private bool TryLoadAssembly() private bool TryLoadAssembly()
{ {
var package = new TestPackage(assemblyName); var package = NUnitTestAdapter.CreateTestPackage(assemblyName);
package.Settings["ShadowCopyFiles"] = false;
logger.SendDebugMessage("ShadowCopyFiles is set to :" + package.Settings["ShadowCopyFiles"]);
if (!runner.Load(package)) if (!runner.Load(package))
return false; return false;
logger.SendMessage(TestMessageLevel.Informational,string.Format("Loading tests from {0}",package.FullName)); logger.SendMessage(TestMessageLevel.Informational,string.Format("Loading tests from {0}",package.FullName));

Просмотреть файл

@ -5,15 +5,21 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels;
using NUnit.Core;
using NUnit.Util; using NUnit.Util;
namespace NUnit.VisualStudio.TestAdapter namespace NUnit.VisualStudio.TestAdapter
{ {
public interface INUnitTestAdapter
{
TestPackage CreateTestPackage(string sourceAssembly);
}
/// <summary> /// <summary>
/// NUnitTestAdapter is the common base for the /// NUnitTestAdapter is the common base for the
/// NUnit discoverer and executor classes. /// NUnit discoverer and executor classes.
/// </summary> /// </summary>
public abstract class NUnitTestAdapter public abstract class NUnitTestAdapter : INUnitTestAdapter
{ {
// Our logger used to display messages // Our logger used to display messages
protected TestLogger TestLog; protected TestLogger TestLog;
@ -21,9 +27,9 @@ namespace NUnit.VisualStudio.TestAdapter
private readonly string adapterVersion; private readonly string adapterVersion;
protected bool UseVsKeepEngineRunning { get; private set; } 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; } protected bool RegistryFailure { get; set; }
@ -67,16 +73,18 @@ namespace NUnit.VisualStudio.TestAdapter
#region Protected Helper Methods #region Protected Helper Methods
private const string Name = "NUnit VS Adapter";
protected void Info(string method, string function) 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); TestLog.SendInformationalMessage(msg);
} }
protected void Debug(string method, string function) protected void Debug(string method, string function)
{ {
#if DEBUG #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); TestLog.SendDebugMessage(msg);
#endif #endif
} }
@ -87,6 +95,16 @@ namespace NUnit.VisualStudio.TestAdapter
ChannelServices.UnregisterChannel(chan); 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 #endregion
} }
} }

Просмотреть файл

@ -40,8 +40,7 @@ namespace NUnit.VisualStudio.TestAdapter
TestLog.SendDebugMessage("Processing " + sourceAssembly); TestLog.SendDebugMessage("Processing " + sourceAssembly);
TestRunner runner = new TestDomain(); TestRunner runner = new TestDomain();
TestPackage package = new TestPackage(sourceAssembly); var package = CreateTestPackage(sourceAssembly);
package.Settings["ShadowCopyFiles"] = ShadowCopy;
TestConverter testConverter = null; TestConverter testConverter = null;
try try
{ {
@ -72,6 +71,10 @@ namespace NUnit.VisualStudio.TestAdapter
// Attempts to load an invalid assembly, or an assembly with missing dependencies // Attempts to load an invalid assembly, or an assembly with missing dependencies
TestLog.LoadingAssemblyFailedWarning(ex.FileName, sourceAssembly); TestLog.LoadingAssemblyFailedWarning(ex.FileName, sourceAssembly);
} }
catch (UnsupportedFrameworkException ex)
{
TestLog.UnsupportedFrameworkWarning(sourceAssembly);
}
catch (Exception ex) catch (Exception ex)
{ {

Просмотреть файл

@ -66,7 +66,7 @@ namespace NUnit.VisualStudio.TestAdapter
{ {
sourceAssembly = Path.Combine(Environment.CurrentDirectory, sourceAssembly); sourceAssembly = Path.Combine(Environment.CurrentDirectory, sourceAssembly);
} }
using (currentRunner = new AssemblyRunner(TestLog, sourceAssembly, tfsfilter)) using (currentRunner = new AssemblyRunner(TestLog, sourceAssembly, tfsfilter,this))
{ {
currentRunner.RunAssembly(frameworkHandle); currentRunner.RunAssembly(frameworkHandle);
} }
@ -113,7 +113,7 @@ namespace NUnit.VisualStudio.TestAdapter
var assemblyGroups = tests.GroupBy(tc => tc.Source); var assemblyGroups = tests.GroupBy(tc => tc.Source);
foreach (var assemblyGroup in assemblyGroups) 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); currentRunner.RunAssembly(frameworkHandle);
} }

Просмотреть файл

@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("NUnit Software")] [assembly: AssemblyCompany("NUnit Software")]
[assembly: AssemblyProduct("NUnit.VisualStudio.TestAdapter")] [assembly: AssemblyProduct("NUnit.VisualStudio.TestAdapter")]
[assembly: AssemblyCopyright("Copyright 2011-2014, NUnit Software")] [assembly: AssemblyCopyright("Copyright 2011-2015, NUnit Software")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: CLSCompliant(false)] [assembly: CLSCompliant(false)]
@ -21,5 +21,5 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("c0aad5e4-b486-49bc-b3e8-31e01be6fefe")] [assembly: Guid("c0aad5e4-b486-49bc-b3e8-31e01be6fefe")]
[assembly: AssemblyVersion("1.2.0.1")] [assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("1.2.0.1")] [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."); 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) 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."); 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> <IncludeInVSIX>true</IncludeInVSIX>
</Content> </Content>
<Content Include="preview.png"> <Content Include="preview.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX> <IncludeInVSIX>true</IncludeInVSIX>
</Content> </Content>
<None Include="source.extension.vsixmanifest"> <None Include="source.extension.vsixmanifest">

Двоичные данные
src/NUnitTestAdapterInstall/license.rtf

Двоичный файл не отображается.

Двоичные данные
src/NUnitTestAdapterInstall/preview.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 37 KiB

Просмотреть файл

@ -3,10 +3,10 @@
<Identifier Id="NUnitTestAdapterInstall..7c53286e-ac4f-485f-915c-5ec5a4c47b0c"> <Identifier Id="NUnitTestAdapterInstall..7c53286e-ac4f-485f-915c-5ec5a4c47b0c">
<Name>NUnit Test Adapter</Name> <Name>NUnit Test Adapter</Name>
<Author>Charlie Poole</Author> <Author>Charlie Poole</Author>
<Version>1.2.0.1</Version> <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.3.</Description> <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> <Locale>1033</Locale>
<MoreInfoUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6.3</MoreInfoUrl> <MoreInfoUrl>http://nunit.org/index.php?p=vsTestAdapter&amp;r=2.6.4</MoreInfoUrl>
<License>license.rtf</License> <License>license.rtf</License>
<!--<GettingStartedGuide>http://nunit.org</GettingStartedGuide>--> <!--<GettingStartedGuide>http://nunit.org</GettingStartedGuide>-->
<Icon>nunit_32x32.png</Icon> <Icon>nunit_32x32.png</Icon>

Просмотреть файл

@ -48,7 +48,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
var t1 = new TestCase(fakeTest1.TestName.FullName, ExecutorUri, "test"); var t1 = new TestCase(fakeTest1.TestName.FullName, ExecutorUri, "test");
var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test"); var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test");
var list = new List<TestCase> {t1, t2}; 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(fakeTest1);
runner.AddTestCases(fakeTest2); runner.AddTestCases(fakeTest2);
Assert.That(runner.NUnitFilter.IsEmpty, Is.False, "NUnitfilter should not be empty, we have added testcases"); 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] [Test]
public void AddsNonFilteredCorrectly() public void AddsNonFilteredCorrectly()
{ {
var runner = new AssemblyRunner(new TestLogger(), "test"); var runner = new AssemblyRunner(new TestLogger(), "test",null);
runner.AddTestCases(fakeTest1); runner.AddTestCases(fakeTest1);
runner.AddTestCases(fakeTest2); runner.AddTestCases(fakeTest2);
Assert.That(runner.NUnitFilter.IsEmpty, Is.True, "NUnitfilter has been touched"); Assert.That(runner.NUnitFilter.IsEmpty, Is.True, "NUnitfilter has been touched");
@ -69,7 +69,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
[Test] [Test]
public void VerifyConstruction1() 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); 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 t1 = new TestCase(fakeTest1.TestName.FullName, ExecutorUri, "test");
var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test"); var t2 = new TestCase(fakeTest2.TestName.FullName, ExecutorUri, "test");
var list = new List<TestCase> {t1, t2}; 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.False(runner.NUnitFilter.IsEmpty);
Assert.That(runner.NUnitFilter, Is.TypeOf<SimpleNameFilter>()); Assert.That(runner.NUnitFilter, Is.TypeOf<SimpleNameFilter>());
Assert.True(runner.NUnitFilter.Match(fakeTest1)); Assert.True(runner.NUnitFilter.Match(fakeTest1));

Просмотреть файл

@ -44,8 +44,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\mock-assembly.dll</HintPath> <HintPath>..\..\lib\mock-assembly.dll</HintPath>
</Reference> </Reference>
<Reference Include="Moq"> <Reference Include="Moq, Version=4.2.1502.911, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\..\packages\Moq.4.1.1309.1617\lib\net40\Moq.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Moq.4.2.1502.0911\lib\net40\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -54,8 +55,9 @@
<Reference Include="nunit.core.interfaces"> <Reference Include="nunit.core.interfaces">
<HintPath>..\..\lib\nunit.core.interfaces.dll</HintPath> <HintPath>..\..\lib\nunit.core.interfaces.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.util, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <Reference Include="nunit.util, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -92,9 +94,6 @@
<ItemGroup> <ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\NUnitTestAdapter\NUnitTestAdapter.csproj"> <ProjectReference Include="..\NUnitTestAdapter\NUnitTestAdapter.csproj">
<Project>{8a85e26a-c706-48b1-bc36-06ebde3efd25}</Project> <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(); 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"); Assert.IsTrue(refNames != null && refNames.Count() == 1, "No reference to Microsoft.VisualStudio.TestPlatform.ObjectModel found");
var nunitVersion = refNames[0].Version; 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 // Load the NUnit mock-assembly.dll once for this test, saving
// the list of test cases sent to the discovery sink // the list of test cases sent to the discovery sink
nunittestDiscoverer = ((ITestDiscoverer)new NUnitTestDiscoverer()); nunittestDiscoverer = new NUnitTestDiscoverer();
nunittestDiscoverer.DiscoverTests(new[] { MockAssemblyPath}, null, this, this); 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"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Moq" version="4.1.1309.1617" targetFramework="net45" /> <package id="Moq" version="4.2.1502.0911" targetFramework="net45" />
<package id="NUnit" version="2.6.3" targetFramework="net45" /> <package id="NUnit" version="2.6.4" targetFramework="net45" />
</packages> </packages>