Skip to content

Commit 4e21f30

Browse files
committed
Misc Test Fixes
1 parent 727a5e5 commit 4e21f30

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

src/NUnitEngine/nunit.engine.core/Drivers/NUnitNetCore31Driver.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
using System.IO;
2929
using NUnit.Engine.Internal;
3030
using System.Reflection;
31-
using System.Runtime.Loader;
3231
using NUnit.Engine.Extensibility;
33-
using Mono.Cecil;
3432

3533
namespace NUnit.Engine.Drivers
3634
{
@@ -55,7 +53,7 @@ public class NUnitNetCore31Driver : IFrameworkDriver
5553
static readonly string RUN_ASYNC_METHOD = "RunTests";
5654
static readonly string STOP_RUN_METHOD = "StopRun";
5755

58-
static ILogger log = InternalTrace.GetLogger(nameof(NUnitNetStandardDriver));
56+
static ILogger log = InternalTrace.GetLogger(nameof(NUnitNetCore31Driver));
5957

6058
Assembly _testAssembly;
6159
Assembly _frameworkAssembly;

src/NUnitEngine/nunit.engine.core/Drivers/NUnitNetStandardDriver.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222
// ***********************************************************************
2323

24-
#if NETSTANDARD || NETCOREAPP3_1
24+
#if NETSTANDARD
2525
using System;
2626
using System.Linq;
2727
using System.Collections.Generic;

src/NUnitEngine/nunit.engine.tests/Drivers/NUnitNetStandardDriverTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222
// ***********************************************************************
2323

24-
#if NETCOREAPP
24+
#if NETCOREAPP1_1 || NETCOREAPP2_1
2525

2626
using System;
2727
using System.Collections.Generic;

src/NUnitEngine/nunit.engine.tests/Services/DriverServiceTests.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ public void ServiceIsStarted()
5454
}
5555

5656

57-
#if NETCOREAPP
57+
#if NETCOREAPP3_1
58+
[TestCase("mock-assembly.dll", false, typeof(NUnitNetCore31Driver))]
59+
[TestCase("mock-assembly.dll", true, typeof(NUnitNetCore31Driver))]
60+
[TestCase("notest-assembly.dll", false, typeof(NUnitNetCore31Driver))]
61+
#elif NETCOREAPP1_1 || NETCOREAPP2_1
5862
[TestCase("mock-assembly.dll", false, typeof(NUnitNetStandardDriver))]
5963
[TestCase("mock-assembly.dll", true, typeof(NUnitNetStandardDriver))]
6064
[TestCase("notest-assembly.dll", false, typeof(NUnitNetStandardDriver))]

src/NUnitEngine/nunit.engine.tests/Services/TestFilteringTests.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ public class TestFilteringTests
3535
{
3636
private const string MOCK_ASSEMBLY = "mock-assembly.dll";
3737

38-
#if NETCOREAPP
38+
#if NETCOREAPP1_1 || NETCOREAPP2_1
3939
private NUnitNetStandardDriver _driver;
40+
#elif NETCOREAPP3_1
41+
private NUnitNetCore31Driver _driver;
4042
#else
4143
private NUnit3FrameworkDriver _driver;
4244
#endif
@@ -45,8 +47,10 @@ public class TestFilteringTests
4547
public void LoadAssembly()
4648
{
4749
var mockAssemblyPath = System.IO.Path.Combine(TestContext.CurrentContext.TestDirectory, MOCK_ASSEMBLY);
48-
#if NETCOREAPP
50+
#if NETCOREAPP1_1 || NETCOREAPP2_1
4951
_driver = new NUnitNetStandardDriver();
52+
#elif NETCOREAPP3_1
53+
_driver = new NUnitNetCore31Driver();
5054
#else
5155
var assemblyName = typeof(NUnit.Framework.TestAttribute).Assembly.GetName();
5256
_driver = new NUnit3FrameworkDriver(AppDomain.CurrentDomain, assemblyName);

0 commit comments

Comments
 (0)