Skip to content

Commit

Permalink
Added NUnit testing to the build process so the build will fail if an…
Browse files Browse the repository at this point in the history
…y tests are invalid.
  • Loading branch information
NightOwl888 committed Aug 21, 2014
1 parent bca8e5a commit ddfd9d4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build/runbuild.ps1
Expand Up @@ -48,7 +48,27 @@ task Restore -depends Clean -description "This task runs NuGet package restore"
}
}

task Compile -depends Clean, Init, Restore -description "This task compiles the solution" {
task Test -depends Clean, Init, Restore -description "This tasks runs the unit tests" {
Write-Host "Running Unit Tests..." -ForegroundColor Magenta

$target_project = "$source_directory\MvcSiteMapProvider.Tests\MvcSiteMapProvider.Tests.csproj"

exec {
msbuild $target_project `
/verbosity:quiet `
/property:Configuration=$configuration `
"/t:Clean;Rebuild" `
/property:WarningLevel=3 `
/property:DefineConstants=`" MVC4`;NET40`" `
/property:TargetFrameworkVersion=v4.0 `"
}

exec {
&"$tools_directory\nunit\nunit-console.exe" $target_project /config:$configuration /noshadow /noresult /framework:net-4.0
}
}

task Compile -depends Test -description "This task compiles the solution" {

Write-Host "Compiling..." -ForegroundColor Green

Expand Down
Binary file added tools/nunit/nunit-agent.exe
Binary file not shown.
Binary file added tools/nunit/nunit-console-runner.dll
Binary file not shown.
Binary file added tools/nunit/nunit-console.exe
Binary file not shown.
Binary file added tools/nunit/nunit.core.dll
Binary file not shown.
Binary file added tools/nunit/nunit.core.interfaces.dll
Binary file not shown.
Binary file added tools/nunit/nunit.framework.dll
Binary file not shown.
Binary file added tools/nunit/nunit.util.dll
Binary file not shown.

0 comments on commit ddfd9d4

Please sign in to comment.