Pass null as NUnit version to always get latest package

This commit is contained in:
Chris Maddock 2016-07-14 21:07:35 +01:00
Родитель 4c63f35a5b
Коммит 97a524cfe4
3 изменённых файлов: 3 добавлений и 6 удалений

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

@ -33,7 +33,6 @@ namespace TestGeneration.Extensions.NUnit
{
public class NUnit3SolutionManager : SolutionManagerBase
{
private const string NUnit3Version = "3.2.0";
/// <summary>
/// Initializes a new instance of the <see cref="NUnit3SolutionManager"/> class.
/// </summary>
@ -60,7 +59,7 @@ namespace TestGeneration.Extensions.NUnit
TraceLogger.LogInfo("NUnitSolutionManager.OnUnitTestProjectCreated: Adding reference to NUnit assemblies through nuget.");
base.OnUnitTestProjectCreated(unitTestProject, sourceMethod);
this.EnsureNuGetReference(unitTestProject, "NUnit", NUnit3Version);
this.EnsureNuGetReference(unitTestProject, "NUnit", null);
var vsp = unitTestProject.Object as VSProject2;
var reference = vsp?.References.Find(GlobalConstants.MSTestAssemblyName);

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

@ -48,8 +48,6 @@ namespace TestGeneration.Extensions.IntelliTest.NUnit
[Serializable]
sealed class NUnit3TestFramework : AttributeBasedTestFrameworkBase
{
private const string NUnitVersion = "3.2.0";
/// <summary>
/// Initializes a new instance of the <see cref="NUnit3TestFramework"/> class.
/// </summary>
@ -83,7 +81,7 @@ namespace TestGeneration.Extensions.IntelliTest.NUnit
/// The test framework references.
/// </summary>
public override ICountable<ShortReferenceAssemblyName> References =>
Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), NUnitVersion,
Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), null,
AssemblyReferenceType.NugetReference));
/// <summary>

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

@ -7,8 +7,8 @@
Creates Unit tests and Intellitests with both NUnit 2.6.4 and NUnit 3 frameworks.
</Description>
<MoreInfo>https://github.com/nunit/nunit-vs-testgenerator</MoreInfo>
<GettingStartedGuide>https://github.com/nunit/docs/wiki/Visual-Studio-Test-Generator</GettingStartedGuide>
<License>license.txt</License>
<GettingStartedGuide>https://github.com/nunit/docs/wiki/Visual-Studio-Test-Generator</GettingStartedGuide>
<Icon>nunit3_32x32.png</Icon>
<PreviewImage>preview.jpg</PreviewImage>
<Tags>unit testing, NUnit</Tags>