Skip to content

Commit

Permalink
grunt test uses nunit3. style cop
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbeach committed Aug 3, 2016
1 parent 6f81ded commit c415ec7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
13 changes: 11 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ module.exports = function(grunt) {

clean: {
nuget: ['*.nupkg'],
},

shell: {
options: {
stderr: false
},
nunit: {
command: 'nunit3-console.exe tests\\bin\\Debug\\tests.dll'
}
}

});
Expand All @@ -111,12 +120,12 @@ module.exports = function(grunt) {

grunt.registerTask('default', ['build']);
grunt.registerTask('build', ['nugetrestore','msbuild:debug','msbuild:release']);
grunt.registerTask('test', ['nugetrestore','msbuild:debug', 'mstest']);
grunt.registerTask('test', ['nugetrestore','msbuild:debug', 'shell:nunit']);
grunt.registerTask('release', ['assemblyinfo', 'test']);
grunt.registerTask('publishNuget', ['release', 'msbuild:release', 'nugetpack', 'nugetpush', 'clean:nuget']);
grunt.registerTask('coverage', '', function() {
var exec = require('child_process').execSync;
var result = exec('packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe -register:user -target:nunit-console.exe "-targetargs:""tests\\bin\\Debug\\tests.dll"" "--x86 -output:opencoverCoverage.xml', { encoding: 'utf8' });
var result = exec('packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe -register:user -target:nunit3-console.exe "-targetargs:""tests\\bin\\Debug\\tests.dll"" "--x86 -output:opencoverCoverage.xml', { encoding: 'utf8' });
grunt.log.writeln(result);
});
grunt.registerTask('viewCoverage', '', function() {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"grunt-msbuild": "^0.2.2",
"grunt-mstest": "^0.1.5",
"grunt-nuget": "~0.1.4",
"grunt-shell": "^1.3.0",
"load-grunt-tasks": "^0.6.0",
"time-grunt": "^1.0.0"
},
Expand Down
7 changes: 0 additions & 7 deletions tests/TestUaClientNotConnected.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace Hylasoft.Opc.Tests
{
public class TestUaClientNotConnected : UaClient
{
private OpcStatus _discard;

public TestUaClientNotConnected(Uri server)
: base(server)
{
Expand All @@ -33,11 +31,6 @@ public Session SessionExtended
{
return OpcStatus.NotConnected;
}

set
{
_discard = value;
}
}
}
}
2 changes: 0 additions & 2 deletions tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<package id="Hylasoft.Behavior" version="0.1.3" targetFramework="net45" />
<package id="Moq" version="4.5.16" targetFramework="net45" />
<package id="NUnit" version="3.4.1" targetFramework="net45" />
<package id="NUnit.ConsoleRunner" version="3.4.1" targetFramework="net45" />
<package id="NUnit.Runners" version="3.4.1" targetFramework="net45" />
<package id="OpenCover" version="4.6.519" targetFramework="net45" />
<package id="ReportGenerator" version="2.4.5.0" targetFramework="net45" />
</packages>

0 comments on commit c415ec7

Please sign in to comment.