From 97a524cfe4cf8e0d4fffb00f09fd54f24e41b99b Mon Sep 17 00:00:00 2001 From: Chris Maddock Date: Thu, 14 Jul 2016 21:07:35 +0100 Subject: [PATCH] Pass null as NUnit version to always get latest package --- CreateUnitTests.NUnit/NUnit3SolutionManager.cs | 3 +-- IntelliTest.NUnit/NUnit3TestFramework.cs | 4 +--- TestGeneration.Extensions.NUnit/source.extension.vsixmanifest | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CreateUnitTests.NUnit/NUnit3SolutionManager.cs b/CreateUnitTests.NUnit/NUnit3SolutionManager.cs index 6474f13..986c05b 100644 --- a/CreateUnitTests.NUnit/NUnit3SolutionManager.cs +++ b/CreateUnitTests.NUnit/NUnit3SolutionManager.cs @@ -33,7 +33,6 @@ namespace TestGeneration.Extensions.NUnit { public class NUnit3SolutionManager : SolutionManagerBase { - private const string NUnit3Version = "3.2.0"; /// /// Initializes a new instance of the class. /// @@ -60,7 +59,7 @@ protected override void OnUnitTestProjectCreated(Project unitTestProject, CodeFu 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); diff --git a/IntelliTest.NUnit/NUnit3TestFramework.cs b/IntelliTest.NUnit/NUnit3TestFramework.cs index fa5b064..ea468ca 100644 --- a/IntelliTest.NUnit/NUnit3TestFramework.cs +++ b/IntelliTest.NUnit/NUnit3TestFramework.cs @@ -48,8 +48,6 @@ namespace TestGeneration.Extensions.IntelliTest.NUnit [Serializable] sealed class NUnit3TestFramework : AttributeBasedTestFrameworkBase { - private const string NUnitVersion = "3.2.0"; - /// /// Initializes a new instance of the class. /// @@ -83,7 +81,7 @@ public NUnit3TestFramework(IPexComponent host) /// The test framework references. /// public override ICountable References => - Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), NUnitVersion, + Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), null, AssemblyReferenceType.NugetReference)); /// diff --git a/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest b/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest index ff680e0..d56dfcf 100644 --- a/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest +++ b/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest @@ -7,8 +7,8 @@ Creates Unit tests and Intellitests with both NUnit 2.6.4 and NUnit 3 frameworks. https://github.com/nunit/nunit-vs-testgenerator - https://github.com/nunit/docs/wiki/Visual-Studio-Test-Generator license.txt + https://github.com/nunit/docs/wiki/Visual-Studio-Test-Generator nunit3_32x32.png preview.jpg unit testing, NUnit