Permalink
Browse files

Fix to not use a test filter in NUnit when no filters has been declar…

…ed in Giles. This was causing NUnit to not run the tests
  • Loading branch information...
codereflection committed Feb 12, 2012
1 parent 63521ab commit 2af0316fae76cecc805ffe4ca4b3fe0c187b4ad0
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/Runners/Giles.Runner.NUnit/NUnitRunner.cs
@@ -1,9 +1,7 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Giles.Core.Runners;
-using Giles.Core.Utility;
using NUnit.Core;
using NUnit.Core.Filters;
@@ -20,7 +18,10 @@ public SessionResults RunAssembly(Assembly assembly, IEnumerable<string> filters
var package = SetupTestPackager(assembly);
remoteTestRunner.Load(package);
var listener = new GilesNUnitEventListener();
- remoteTestRunner.Run(listener, GetFilters());
+ if (filters.Count() == 0)
+ remoteTestRunner.Run(listener);
+ else
+ remoteTestRunner.Run(listener, GetFilters());
return listener.SessionResults;
}

0 comments on commit 2af0316

Please sign in to comment.