Skip to content

Commit

Permalink
Issue941 (#944)
Browse files Browse the repository at this point in the history
* Fixing Issue #941

* updating acceptance tests

* Update tests
  • Loading branch information
OsirisTerje authored Jan 19, 2022
1 parent d7ed9db commit a1ed8ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var configuration = Argument("configuration", "Release");
// SET PACKAGE VERSION
//////////////////////////////////////////////////////////////////////

var version = "4.2.0";
var modifier = "";
var version = "4.2.1";
var modifier = "-dev.2";

var dbgSuffix = configuration.ToLower() == "debug" ? "-dbg" : "";
var packageVersion = version + modifier + dbgSuffix;
Expand Down
8 changes: 5 additions & 3 deletions src/NUnit.TestAdapter.Tests.Acceptance/FilterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ namespace Filter
public class Tests
{
[Test,Category(""FooGroup"")]
[Test,Category(""FooGroup""),Category(""AllGroup"")]
public void Foo()
{
Assert.Pass();
}
[Test,Explicit,Category(""IsExplicit""),Category(""FooGroup"")]
[Test,Explicit,Category(""IsExplicit""),Category(""FooGroup""),Category(""AllGroup"")]
public void FooExplicit()
{
Assert.Pass();
}
[Test, Category(""BarGroup"")]
[Test, Category(""BarGroup""),Category(""AllGroup"")]
public void Bar()
{
Assert.Pass();
Expand All @@ -45,6 +45,8 @@ public void Bar()
[TestCase(@"TestCategory=IsExplicit", 1, 1)]
[TestCase(@"FullyQualifiedName=Filter.Tests.Foo", 1, 1)]
[TestCase(@"FullyQualifiedName!=Filter.Tests.Foo", 1, 1)]
[TestCase(@"TestCategory!=AllGroup", 0, 0)]
// [TestCase(@"TestThatDontExistHere", 0, 0)]
// [TestCase(@"FullyQualifiedName~Filter.Tests.Foo", 1, 1)]
// [TestCase(@"FullyQualifiedName~Foo", 1, 1)]
public void Filter_DotNetTest(string filter, int executed, int total)
Expand Down
2 changes: 2 additions & 0 deletions src/NUnitTestAdapter/Execution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ protected TestFilter CheckFilter(TestFilter testFilter, IDiscoveryConverter disc
var filter = TestFilter.Empty;
return filter;
}
if (discovery.NoOfLoadedTestCases == 0)
return testFilter;
if (testFilter.IsCategoryFilter())
{
if (!discovery.IsExplicitRun && discovery.HasExplicitTests && Settings.ExplicitMode == ExplicitModeEnum.Strict)
Expand Down

0 comments on commit a1ed8ed

Please sign in to comment.