Skip to content

Commit a1ed8ed

Browse files
authored
Issue941 (#944)
* Fixing Issue #941 * updating acceptance tests * Update tests
1 parent d7ed9db commit a1ed8ed

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

build.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ var configuration = Argument("configuration", "Release");
1212
// SET PACKAGE VERSION
1313
//////////////////////////////////////////////////////////////////////
1414

15-
var version = "4.2.0";
16-
var modifier = "";
15+
var version = "4.2.1";
16+
var modifier = "-dev.2";
1717

1818
var dbgSuffix = configuration.ToLower() == "debug" ? "-dbg" : "";
1919
var packageVersion = version + modifier + dbgSuffix;

src/NUnit.TestAdapter.Tests.Acceptance/FilterTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ namespace Filter
1515
public class Tests
1616
{
1717
18-
[Test,Category(""FooGroup"")]
18+
[Test,Category(""FooGroup""),Category(""AllGroup"")]
1919
public void Foo()
2020
{
2121
Assert.Pass();
2222
}
2323
24-
[Test,Explicit,Category(""IsExplicit""),Category(""FooGroup"")]
24+
[Test,Explicit,Category(""IsExplicit""),Category(""FooGroup""),Category(""AllGroup"")]
2525
public void FooExplicit()
2626
{
2727
Assert.Pass();
2828
}
2929
30-
[Test, Category(""BarGroup"")]
30+
[Test, Category(""BarGroup""),Category(""AllGroup"")]
3131
public void Bar()
3232
{
3333
Assert.Pass();
@@ -45,6 +45,8 @@ public void Bar()
4545
[TestCase(@"TestCategory=IsExplicit", 1, 1)]
4646
[TestCase(@"FullyQualifiedName=Filter.Tests.Foo", 1, 1)]
4747
[TestCase(@"FullyQualifiedName!=Filter.Tests.Foo", 1, 1)]
48+
[TestCase(@"TestCategory!=AllGroup", 0, 0)]
49+
// [TestCase(@"TestThatDontExistHere", 0, 0)]
4850
// [TestCase(@"FullyQualifiedName~Filter.Tests.Foo", 1, 1)]
4951
// [TestCase(@"FullyQualifiedName~Foo", 1, 1)]
5052
public void Filter_DotNetTest(string filter, int executed, int total)

src/NUnitTestAdapter/Execution.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ protected TestFilter CheckFilter(TestFilter testFilter, IDiscoveryConverter disc
7474
var filter = TestFilter.Empty;
7575
return filter;
7676
}
77+
if (discovery.NoOfLoadedTestCases == 0)
78+
return testFilter;
7779
if (testFilter.IsCategoryFilter())
7880
{
7981
if (!discovery.IsExplicitRun && discovery.HasExplicitTests && Settings.ExplicitMode == ExplicitModeEnum.Strict)

0 commit comments

Comments
 (0)