nunit / nunit-vs-testgenerator

A Visual Studio extension for generating unit tests and IntelliTests using NUnit
https://visualstudiogallery.msdn.microsoft.com/bd30bf3f-4183-4b00-a245-1875316b8cd3
MIT License
35 stars 23 forks source link

Upgrade NUnit version #17

Closed ChrisMaddock closed 8 years ago

ChrisMaddock commented 8 years ago

And finally, update the NUnit version to 3.4.1. (Fixes #14) Apologies for all the PRs, hoped splitting them up would make it easier to review.

Is it worth doing another release of this? These three PRs are all aesthetic, but it would be good to have #7 in a release. The currently released version is also using NUnit 3.0.1.

rprouse commented 8 years ago

Should we bump the version in the vsixmanifest at the same time?

ChrisMaddock commented 8 years ago

@rprouse - I presumed that would just be done on release? (I wasn't intending this PR to be a release - just seemed sensible to mention it here rather than a new issue!)

CharliePoole commented 8 years ago

@ChrisMaddock So what does this actually do? Doesn't it generate tests the same way whatever the NUnit version?

ChrisMaddock commented 8 years ago

@CharliePoole - one of bits of options is to generate a new Unit Test project. This is created with a reference/nuget packages.config pointing at whichever version is specified.

CharliePoole commented 8 years ago

And the user doesn't get a choice? Except between major versions?

CharliePoole commented 8 years ago

If we always want to use the latest NUnit 3 release, why code the version at all?

ChrisMaddock commented 8 years ago

The user can change the reference as they wish, but this is the default version that a new project will be created with.

As far as I can see (though trial and error - if there are any docs - I couldn't find them!) - this won't ever overwrite anything the user sets (even if the nunit reference added is lower than the specified version).

If we always want to use the latest NUnit 3 release, why code the version at all?

I thought the same, but if it's possible, I couldn't work out how! A version string is required - I don't know if it's possible to pass a * or something to 'default to latest'. @OsirisTerje, any ideas?

OsirisTerje commented 8 years ago

The test generator extension as it is now is bound to a specific version at creation time. What the user do afterwards is of course up to the user. All we do is to give parameters to an internal method on the test platform, and that method seems to require a version number. But I will ask the MS guys if it will work without anything here (or a * as you say. so that it always use the latest, which it should do for NUnit3. For NUnit2 we need to bind it to 2.6.4, otherwise it will step up to latest NUnit3. The PR is good otherwise,we can just merge this in.

OsirisTerje commented 8 years ago

I've got a answer from the MS PG that if we pass in a null for the version, it will use the latest. Can you do that change for the NUnit 3 @ChrisMaddock ?

ChrisMaddock commented 8 years ago

Tried it out and it seems to work @OsirisTerje - done!