From 45a4ad7bd584707cf997c51cb1b007f0164522c8 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Wed, 1 Jan 2025 11:02:19 -0800 Subject: [PATCH] Move shared types from core to api assembly --- NUnitConsole.sln | 14 +++--- package-tests.cake | 12 ++--- .../nunit4-console/ConsoleRunner.cs | 1 + .../nunit4-console/nunit4-console.csproj | 1 - .../nunit4-netcore-console/ConsoleRunner.cs | 1 + src/NUnitEngine/agents/AgentExitCodes.cs | 16 ------ .../nunit-agent-net462-x86.csproj | 5 +- .../nunit-agent-net462.csproj | 5 +- .../nunit-agent-net60.csproj | 1 - .../nunit-agent-net70.csproj | 1 - .../nunit-agent-net80.csproj | 1 - .../nunit-agent-netcore31.csproj | 5 +- .../nunit.engine.api/Agents/AgentExitCodes.cs | 49 +++++++++++++++++++ .../AsyncTestEngineResult.cs | 17 +++++-- .../Communication/Messages/CommandMessage.cs | 15 +++++- .../Messages/CommandReturnMessage.cs | 10 ++++ .../Communication/Messages/ProgressMessage.cs | 10 ++++ .../Messages/TestEngineMessage.cs | 3 ++ .../Protocols/ISerializationProtocol.cs | 3 ++ .../EnginePackageSettings.cs | 0 .../ITestAgent.cs | 0 .../ITestEngineRunner.cs | 0 .../InternalEnginePackageSettings.cs | 0 .../{ => Services}/IResultService.cs | 2 +- .../IRuntimeFrameworkService.cs | 2 +- .../Services}/ITestAgency.cs | 0 .../{ => Services}/ITestFilterService.cs | 2 +- .../TestEngineResult.cs | 9 +++- .../nunit.engine.api/nunit.engine.api.csproj | 4 ++ .../Remoting/TestAgentRemotingTransport.cs | 1 + .../Transports/Tcp/SocketReader.cs | 2 +- .../Api/ServiceLocatorTests.cs | 1 + .../Transports/Tcp/TestAgentTcpProxy.cs | 2 +- .../Services/RuntimeFrameworkService.cs | 1 + .../nunit.engine/Services/TestAgency.cs | 1 + .../nunit.engine/nunit.engine.csproj | 1 - 36 files changed, 144 insertions(+), 54 deletions(-) delete mode 100644 src/NUnitEngine/agents/AgentExitCodes.cs create mode 100644 src/NUnitEngine/nunit.engine.api/Agents/AgentExitCodes.cs rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/AsyncTestEngineResult.cs (74%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/Communication/Messages/CommandMessage.cs (61%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/Communication/Messages/CommandReturnMessage.cs (65%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/Communication/Messages/ProgressMessage.cs (64%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/Communication/Messages/TestEngineMessage.cs (83%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/Communication/Protocols/ISerializationProtocol.cs (96%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/EnginePackageSettings.cs (100%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/ITestAgent.cs (100%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/ITestEngineRunner.cs (100%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/InternalEnginePackageSettings.cs (100%) rename src/NUnitEngine/nunit.engine.api/{ => Services}/IResultService.cs (96%) rename src/NUnitEngine/nunit.engine.api/{ => Services}/IRuntimeFrameworkService.cs (98%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api/Services}/ITestAgency.cs (100%) rename src/NUnitEngine/nunit.engine.api/{ => Services}/ITestFilterService.cs (92%) rename src/NUnitEngine/{nunit.engine.core => nunit.engine.api}/TestEngineResult.cs (95%) diff --git a/NUnitConsole.sln b/NUnitConsole.sln index 24c9bd494..45dd9489f 100644 --- a/NUnitConsole.sln +++ b/NUnitConsole.sln @@ -100,8 +100,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net60", "src\NU EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net462", "src\NUnitEngine\agents\nunit-agent-net462\nunit-agent-net462.csproj", "{E4041712-A1F1-479D-A7F7-89F491066163}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net462-x86", "src\NUnitEngine\agents\nunit-agent-net462-x86\nunit-agent-net462-x86.csproj", "{D4AE483A-D4E1-4892-AF87-3607FBA8755F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net70", "src\NUnitEngine\agents\nunit-agent-net70\nunit-agent-net70.csproj", "{1343AB32-5FB0-408B-9BAC-B1483414D5D5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit4-console", "src\NUnitConsole\nunit4-console\nunit4-console.csproj", "{E1F5F8D3-4AC4-4BB0-9438-2BF41768B473}" @@ -138,6 +136,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfTest", "src\TestData\wpf EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp", "src\TestData\WpfApp\WpfApp.csproj", "{93D182B7-2F63-4661-BB32-94F1716CF03F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net462-x86", "src\NUnitEngine\agents\nunit-agent-net462-x86\nunit-agent-net462-x86.csproj", "{13A3360D-DD36-456B-80BD-E0A6BA15706F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -184,10 +184,6 @@ Global {E4041712-A1F1-479D-A7F7-89F491066163}.Debug|Any CPU.Build.0 = Debug|Any CPU {E4041712-A1F1-479D-A7F7-89F491066163}.Release|Any CPU.ActiveCfg = Release|Any CPU {E4041712-A1F1-479D-A7F7-89F491066163}.Release|Any CPU.Build.0 = Release|Any CPU - {D4AE483A-D4E1-4892-AF87-3607FBA8755F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D4AE483A-D4E1-4892-AF87-3607FBA8755F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D4AE483A-D4E1-4892-AF87-3607FBA8755F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D4AE483A-D4E1-4892-AF87-3607FBA8755F}.Release|Any CPU.Build.0 = Release|Any CPU {1343AB32-5FB0-408B-9BAC-B1483414D5D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1343AB32-5FB0-408B-9BAC-B1483414D5D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {1343AB32-5FB0-408B-9BAC-B1483414D5D5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -240,6 +236,10 @@ Global {93D182B7-2F63-4661-BB32-94F1716CF03F}.Debug|Any CPU.Build.0 = Debug|Any CPU {93D182B7-2F63-4661-BB32-94F1716CF03F}.Release|Any CPU.ActiveCfg = Release|Any CPU {93D182B7-2F63-4661-BB32-94F1716CF03F}.Release|Any CPU.Build.0 = Release|Any CPU + {13A3360D-DD36-456B-80BD-E0A6BA15706F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13A3360D-DD36-456B-80BD-E0A6BA15706F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13A3360D-DD36-456B-80BD-E0A6BA15706F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13A3360D-DD36-456B-80BD-E0A6BA15706F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -262,7 +262,6 @@ Global {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39} {D5CC541C-95B7-4CB4-AADD-660FDCC281B8} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} {E4041712-A1F1-479D-A7F7-89F491066163} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} - {D4AE483A-D4E1-4892-AF87-3607FBA8755F} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} {1343AB32-5FB0-408B-9BAC-B1483414D5D5} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} {E1F5F8D3-4AC4-4BB0-9438-2BF41768B473} = {576DB1E6-C5EC-4FEF-A826-EC19D8BEE572} {0D6B575A-93B4-4944-B4C0-68CDD413B904} = {576DB1E6-C5EC-4FEF-A826-EC19D8BEE572} @@ -279,6 +278,7 @@ Global {48DF1E40-93BA-436A-B460-5D1130316ADA} = {37D508B2-91E0-4B32-869B-DFF9E68EA213} {2F9D8932-2186-464F-BED6-7D7979C8FFA6} = {37D508B2-91E0-4B32-869B-DFF9E68EA213} {93D182B7-2F63-4661-BB32-94F1716CF03F} = {37D508B2-91E0-4B32-869B-DFF9E68EA213} + {13A3360D-DD36-456B-80BD-E0A6BA15706F} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D8E4FC26-5422-4C51-8BBC-D1AC0A578711} diff --git a/package-tests.cake b/package-tests.cake index 7c6ad2179..c8fc8d85d 100644 --- a/package-tests.cake +++ b/package-tests.cake @@ -209,12 +209,12 @@ StandardRunnerTests.Add(new PackageTest( AddToBothLists(new PackageTest( 1, "Net60WPFTest", "Run test using WPF under .NET 6.0", - "testdata/net6.0-windows/WpfTest.dll --trace=Debug", + "testdata/net6.0-windows/WpfTest.dll", new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-6.0") } })); AddToBothLists(new PackageTest( 1, "Net80WPFTest", "Run test using WPF under .NET 8.0", - "testdata/net8.0-windows/WpfTest.dll --trace=Debug", + "testdata/net8.0-windows/WpfTest.dll", new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-8.0") } })); ////////////////////////////////////////////////////////////////////// @@ -265,7 +265,7 @@ StandardRunnerTests.Add(new PackageTest( //StandardRunnerTests.Add(new PackageTest( // 1, "VSProjectLoaderTest_Solution", // "Run mock-assembly using the .sln file", -// "../../src/TestData/TestData.sln --config=Release --trace=Debug", +// "../../src/TestData/TestData.sln --config=Release", // new ExpectedResult("Failed") // { // Total = 37 * 5, @@ -337,7 +337,7 @@ StandardRunnerTests.Add(new PackageTest( StandardRunnerTests.Add(new PackageTest( 1, "InvalidTestNameTest_Net462", "Ensure we handle invalid test names correctly under .NET 4.6.2", - "testdata/net462/InvalidTestNames.dll --trace:Debug", + "testdata/net462/InvalidTestNames.dll", new ExpectedResult("Passed") { Assemblies = new ExpectedAssemblyResult[] @@ -349,7 +349,7 @@ StandardRunnerTests.Add(new PackageTest( AddToBothLists(new PackageTest( 1, "InvalidTestNameTest_Net60", "Ensure we handle invalid test names correctly under .NET 6.0", - "testdata/net6.0/InvalidTestNames.dll --trace:Debug", + "testdata/net6.0/InvalidTestNames.dll", new ExpectedResult("Passed") { Assemblies = new ExpectedAssemblyResult[] @@ -361,7 +361,7 @@ AddToBothLists(new PackageTest( AddToBothLists(new PackageTest( 1, "InvalidTestNameTest_Net80", "Ensure we handle invalid test names correctly under .NET 8.0", - "testdata/net8.0/InvalidTestNames.dll --trace:Debug", + "testdata/net8.0/InvalidTestNames.dll", new ExpectedResult("Passed") { Assemblies = new ExpectedAssemblyResult[] diff --git a/src/NUnitConsole/nunit4-console/ConsoleRunner.cs b/src/NUnitConsole/nunit4-console/ConsoleRunner.cs index 7bdc21d99..3546cc513 100644 --- a/src/NUnitConsole/nunit4-console/ConsoleRunner.cs +++ b/src/NUnitConsole/nunit4-console/ConsoleRunner.cs @@ -11,6 +11,7 @@ using NUnit.Engine.Extensibility; using System.Runtime.InteropServices; using System.Text; +using NUnit.Engine.Services; namespace NUnit.ConsoleRunner { diff --git a/src/NUnitConsole/nunit4-console/nunit4-console.csproj b/src/NUnitConsole/nunit4-console/nunit4-console.csproj index e49338b0c..b98f81144 100644 --- a/src/NUnitConsole/nunit4-console/nunit4-console.csproj +++ b/src/NUnitConsole/nunit4-console/nunit4-console.csproj @@ -22,7 +22,6 @@ - diff --git a/src/NUnitConsole/nunit4-netcore-console/ConsoleRunner.cs b/src/NUnitConsole/nunit4-netcore-console/ConsoleRunner.cs index 7bdc21d99..3546cc513 100644 --- a/src/NUnitConsole/nunit4-netcore-console/ConsoleRunner.cs +++ b/src/NUnitConsole/nunit4-netcore-console/ConsoleRunner.cs @@ -11,6 +11,7 @@ using NUnit.Engine.Extensibility; using System.Runtime.InteropServices; using System.Text; +using NUnit.Engine.Services; namespace NUnit.ConsoleRunner { diff --git a/src/NUnitEngine/agents/AgentExitCodes.cs b/src/NUnitEngine/agents/AgentExitCodes.cs deleted file mode 100644 index c1dfc0bfb..000000000 --- a/src/NUnitEngine/agents/AgentExitCodes.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt - -namespace NUnit.Common -{ - internal static class AgentExitCodes - { - public const int OK = 0; - public const int PARENT_PROCESS_TERMINATED = -1; - public const int FAILED_TO_START_REMOTE_AGENT = -2; - public const int DEBUGGER_SECURITY_VIOLATION = -3; - public const int DEBUGGER_NOT_IMPLEMENTED = -4; - public const int UNABLE_TO_LOCATE_AGENCY = -5; - public const int UNEXPECTED_EXCEPTION = -100; - public const int STACK_OVERFLOW_EXCEPTION = -1073741571; - } -} diff --git a/src/NUnitEngine/agents/nunit-agent-net462-x86/nunit-agent-net462-x86.csproj b/src/NUnitEngine/agents/nunit-agent-net462-x86/nunit-agent-net462-x86.csproj index d1f40e79b..870fc6e3a 100644 --- a/src/NUnitEngine/agents/nunit-agent-net462-x86/nunit-agent-net462-x86.csproj +++ b/src/NUnitEngine/agents/nunit-agent-net462-x86/nunit-agent-net462-x86.csproj @@ -22,7 +22,6 @@ - @@ -49,9 +48,9 @@ - + - + \ No newline at end of file diff --git a/src/NUnitEngine/agents/nunit-agent-net462/nunit-agent-net462.csproj b/src/NUnitEngine/agents/nunit-agent-net462/nunit-agent-net462.csproj index 02dfc2346..317ab250f 100644 --- a/src/NUnitEngine/agents/nunit-agent-net462/nunit-agent-net462.csproj +++ b/src/NUnitEngine/agents/nunit-agent-net462/nunit-agent-net462.csproj @@ -21,7 +21,6 @@ - @@ -48,9 +47,9 @@ - + - + \ No newline at end of file diff --git a/src/NUnitEngine/agents/nunit-agent-net60/nunit-agent-net60.csproj b/src/NUnitEngine/agents/nunit-agent-net60/nunit-agent-net60.csproj index 05cfc0e5e..d00f56af7 100644 --- a/src/NUnitEngine/agents/nunit-agent-net60/nunit-agent-net60.csproj +++ b/src/NUnitEngine/agents/nunit-agent-net60/nunit-agent-net60.csproj @@ -22,7 +22,6 @@ - diff --git a/src/NUnitEngine/agents/nunit-agent-net70/nunit-agent-net70.csproj b/src/NUnitEngine/agents/nunit-agent-net70/nunit-agent-net70.csproj index 5e583844d..5fd36b26a 100644 --- a/src/NUnitEngine/agents/nunit-agent-net70/nunit-agent-net70.csproj +++ b/src/NUnitEngine/agents/nunit-agent-net70/nunit-agent-net70.csproj @@ -22,7 +22,6 @@ - diff --git a/src/NUnitEngine/agents/nunit-agent-net80/nunit-agent-net80.csproj b/src/NUnitEngine/agents/nunit-agent-net80/nunit-agent-net80.csproj index 4dc66611a..2eeff9ffc 100644 --- a/src/NUnitEngine/agents/nunit-agent-net80/nunit-agent-net80.csproj +++ b/src/NUnitEngine/agents/nunit-agent-net80/nunit-agent-net80.csproj @@ -23,7 +23,6 @@ - diff --git a/src/NUnitEngine/agents/nunit-agent-netcore31/nunit-agent-netcore31.csproj b/src/NUnitEngine/agents/nunit-agent-netcore31/nunit-agent-netcore31.csproj index d7d7b10af..88d46e86a 100644 --- a/src/NUnitEngine/agents/nunit-agent-netcore31/nunit-agent-netcore31.csproj +++ b/src/NUnitEngine/agents/nunit-agent-netcore31/nunit-agent-netcore31.csproj @@ -23,7 +23,6 @@ - @@ -50,9 +49,9 @@ - + - + \ No newline at end of file diff --git a/src/NUnitEngine/nunit.engine.api/Agents/AgentExitCodes.cs b/src/NUnitEngine/nunit.engine.api/Agents/AgentExitCodes.cs new file mode 100644 index 000000000..8c75127af --- /dev/null +++ b/src/NUnitEngine/nunit.engine.api/Agents/AgentExitCodes.cs @@ -0,0 +1,49 @@ +// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt + +namespace NUnit.Common +{ + /// + /// Exit codes returned by all agents from test runs. A value + /// greater than zero indicates the number of test failures. + /// + public static class AgentExitCodes + { + /// + /// Tests ran without failure. + /// + public const int OK = 0; + + /// + /// The process that created the agent terminated. + /// + public const int PARENT_PROCESS_TERMINATED = -1; + + /// + /// Could no start a remote agent. + /// + public const int FAILED_TO_START_REMOTE_AGENT = -2; + + /// + /// Security violation trying to launch the debugger. + /// + public const int DEBUGGER_SECURITY_VIOLATION = -3; + + /// + /// Debugger is not available on current platform. + /// + public const int DEBUGGER_NOT_IMPLEMENTED = -4; + + /// + /// Unable to locate the process that created the agent. + /// + public const int UNABLE_TO_LOCATE_AGENCY = -5; + + /// + /// An unexpected exception terminated execution + /// + public const int UNEXPECTED_EXCEPTION = -100; + + /// + public const int STACK_OVERFLOW_EXCEPTION = -1073741571; + } +} diff --git a/src/NUnitEngine/nunit.engine.core/AsyncTestEngineResult.cs b/src/NUnitEngine/nunit.engine.api/AsyncTestEngineResult.cs similarity index 74% rename from src/NUnitEngine/nunit.engine.core/AsyncTestEngineResult.cs rename to src/NUnitEngine/nunit.engine.api/AsyncTestEngineResult.cs index 5b586fd0f..5b7b997ea 100644 --- a/src/NUnitEngine/nunit.engine.core/AsyncTestEngineResult.cs +++ b/src/NUnitEngine/nunit.engine.api/AsyncTestEngineResult.cs @@ -17,28 +17,37 @@ public class AsyncTestEngineResult : ITestRun private readonly ManualResetEvent _waitHandle = new ManualResetEvent(false); /// - /// Get the result of this run. + /// Get the result of this test run. /// /// Cannot retrieve Result from an incomplete or cancelled TestRun. public TestEngineResult EngineResult { get { - Guard.OperationValid(_result != null, "Cannot retrieve Result from an incomplete or cancelled TestRun."); + if (_result == null) + throw new InvalidOperationException("Cannot retrieve Result from an incomplete or cancelled TestRun."); return _result; } } + /// + /// Get a handle for use in waiting for the test run to complete. + /// public EventWaitHandle WaitHandle { get { return _waitHandle; } } + /// + /// Set the result of a completed test run. + /// public void SetResult(TestEngineResult result) { - Guard.ArgumentNotNull(result, "result"); - Guard.OperationValid(_result == null, "Cannot set the Result of an TestRun more than once"); + if (result == null) throw new ArgumentNullException(nameof (result)); + + if (_result != null) + throw new InvalidOperationException("Cannot set the Result of a TestRun more than once"); _result = result; _waitHandle.Set(); diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandMessage.cs b/src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandMessage.cs similarity index 61% rename from src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandMessage.cs rename to src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandMessage.cs index 3cfd3a3ed..72c310cac 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandMessage.cs +++ b/src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandMessage.cs @@ -4,17 +4,30 @@ namespace NUnit.Engine.Communication.Messages { + /// + /// + /// [Serializable] public class CommandMessage : TestEngineMessage { + /// + /// + /// + /// + /// public CommandMessage(string commandName, params object[] arguments) { CommandName = commandName; Arguments = arguments; } + /// + /// + /// public string CommandName { get; } - + /// + /// + /// public object[] Arguments { get; } } } diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandReturnMessage.cs b/src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandReturnMessage.cs similarity index 65% rename from src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandReturnMessage.cs rename to src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandReturnMessage.cs index 808b6400b..994dd3ee2 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Messages/CommandReturnMessage.cs +++ b/src/NUnitEngine/nunit.engine.api/Communication/Messages/CommandReturnMessage.cs @@ -4,14 +4,24 @@ namespace NUnit.Engine.Communication.Messages { + /// + /// + /// [Serializable] public class CommandReturnMessage : TestEngineMessage { + /// + /// + /// + /// public CommandReturnMessage(object returnValue) { ReturnValue = returnValue; } + /// + /// + /// public object ReturnValue { get; } } } diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Messages/ProgressMessage.cs b/src/NUnitEngine/nunit.engine.api/Communication/Messages/ProgressMessage.cs similarity index 64% rename from src/NUnitEngine/nunit.engine.core/Communication/Messages/ProgressMessage.cs rename to src/NUnitEngine/nunit.engine.api/Communication/Messages/ProgressMessage.cs index 6038aa792..8c2945197 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Messages/ProgressMessage.cs +++ b/src/NUnitEngine/nunit.engine.api/Communication/Messages/ProgressMessage.cs @@ -4,14 +4,24 @@ namespace NUnit.Engine.Communication.Messages { + /// + /// + /// [Serializable] public class ProgressMessage : TestEngineMessage { + /// + /// + /// + /// public ProgressMessage(string report) { Report = report; } + /// + /// + /// public string Report { get; } } } diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Messages/TestEngineMessage.cs b/src/NUnitEngine/nunit.engine.api/Communication/Messages/TestEngineMessage.cs similarity index 83% rename from src/NUnitEngine/nunit.engine.core/Communication/Messages/TestEngineMessage.cs rename to src/NUnitEngine/nunit.engine.api/Communication/Messages/TestEngineMessage.cs index 16478eab1..0a8794aee 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Messages/TestEngineMessage.cs +++ b/src/NUnitEngine/nunit.engine.api/Communication/Messages/TestEngineMessage.cs @@ -4,6 +4,9 @@ namespace NUnit.Engine.Communication.Messages { + /// + /// + /// [Serializable] public abstract class TestEngineMessage { diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Protocols/ISerializationProtocol.cs b/src/NUnitEngine/nunit.engine.api/Communication/Protocols/ISerializationProtocol.cs similarity index 96% rename from src/NUnitEngine/nunit.engine.core/Communication/Protocols/ISerializationProtocol.cs rename to src/NUnitEngine/nunit.engine.api/Communication/Protocols/ISerializationProtocol.cs index 89b0511dc..f6ffae641 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Protocols/ISerializationProtocol.cs +++ b/src/NUnitEngine/nunit.engine.api/Communication/Protocols/ISerializationProtocol.cs @@ -5,6 +5,9 @@ namespace NUnit.Engine.Communication.Protocols { + /// + /// + /// public interface ISerializationProtocol { /// diff --git a/src/NUnitEngine/nunit.engine.core/EnginePackageSettings.cs b/src/NUnitEngine/nunit.engine.api/EnginePackageSettings.cs similarity index 100% rename from src/NUnitEngine/nunit.engine.core/EnginePackageSettings.cs rename to src/NUnitEngine/nunit.engine.api/EnginePackageSettings.cs diff --git a/src/NUnitEngine/nunit.engine.core/ITestAgent.cs b/src/NUnitEngine/nunit.engine.api/ITestAgent.cs similarity index 100% rename from src/NUnitEngine/nunit.engine.core/ITestAgent.cs rename to src/NUnitEngine/nunit.engine.api/ITestAgent.cs diff --git a/src/NUnitEngine/nunit.engine.core/ITestEngineRunner.cs b/src/NUnitEngine/nunit.engine.api/ITestEngineRunner.cs similarity index 100% rename from src/NUnitEngine/nunit.engine.core/ITestEngineRunner.cs rename to src/NUnitEngine/nunit.engine.api/ITestEngineRunner.cs diff --git a/src/NUnitEngine/nunit.engine.core/InternalEnginePackageSettings.cs b/src/NUnitEngine/nunit.engine.api/InternalEnginePackageSettings.cs similarity index 100% rename from src/NUnitEngine/nunit.engine.core/InternalEnginePackageSettings.cs rename to src/NUnitEngine/nunit.engine.api/InternalEnginePackageSettings.cs diff --git a/src/NUnitEngine/nunit.engine.api/IResultService.cs b/src/NUnitEngine/nunit.engine.api/Services/IResultService.cs similarity index 96% rename from src/NUnitEngine/nunit.engine.api/IResultService.cs rename to src/NUnitEngine/nunit.engine.api/Services/IResultService.cs index 2a04a53a3..0a5d27516 100644 --- a/src/NUnitEngine/nunit.engine.api/IResultService.cs +++ b/src/NUnitEngine/nunit.engine.api/Services/IResultService.cs @@ -3,7 +3,7 @@ using System.Xml; using NUnit.Engine.Extensibility; -namespace NUnit.Engine +namespace NUnit.Engine.Services { /// /// IResultWriterService provides result writers for a specified diff --git a/src/NUnitEngine/nunit.engine.api/IRuntimeFrameworkService.cs b/src/NUnitEngine/nunit.engine.api/Services/IRuntimeFrameworkService.cs similarity index 98% rename from src/NUnitEngine/nunit.engine.api/IRuntimeFrameworkService.cs rename to src/NUnitEngine/nunit.engine.api/Services/IRuntimeFrameworkService.cs index 4f5ffb6de..07ab19613 100644 --- a/src/NUnitEngine/nunit.engine.api/IRuntimeFrameworkService.cs +++ b/src/NUnitEngine/nunit.engine.api/Services/IRuntimeFrameworkService.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -namespace NUnit.Engine +namespace NUnit.Engine.Services { /// /// Implemented by a type that provides information about the diff --git a/src/NUnitEngine/nunit.engine.core/ITestAgency.cs b/src/NUnitEngine/nunit.engine.api/Services/ITestAgency.cs similarity index 100% rename from src/NUnitEngine/nunit.engine.core/ITestAgency.cs rename to src/NUnitEngine/nunit.engine.api/Services/ITestAgency.cs diff --git a/src/NUnitEngine/nunit.engine.api/ITestFilterService.cs b/src/NUnitEngine/nunit.engine.api/Services/ITestFilterService.cs similarity index 92% rename from src/NUnitEngine/nunit.engine.api/ITestFilterService.cs rename to src/NUnitEngine/nunit.engine.api/Services/ITestFilterService.cs index 07a9de15b..69975ce20 100644 --- a/src/NUnitEngine/nunit.engine.api/ITestFilterService.cs +++ b/src/NUnitEngine/nunit.engine.api/Services/ITestFilterService.cs @@ -1,6 +1,6 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt -namespace NUnit.Engine +namespace NUnit.Engine.Services { /// /// The TestFilterService provides builders that can create TestFilters diff --git a/src/NUnitEngine/nunit.engine.core/TestEngineResult.cs b/src/NUnitEngine/nunit.engine.api/TestEngineResult.cs similarity index 95% rename from src/NUnitEngine/nunit.engine.core/TestEngineResult.cs rename to src/NUnitEngine/nunit.engine.api/TestEngineResult.cs index de1419163..e6081a412 100644 --- a/src/NUnitEngine/nunit.engine.core/TestEngineResult.cs +++ b/src/NUnitEngine/nunit.engine.api/TestEngineResult.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Reflection; using System.Xml; -using NUnit.Engine.Internal; namespace NUnit.Engine { @@ -109,11 +108,19 @@ public XmlNode Xml } } + /// + /// + /// + /// public void Add(string xml) { this._xmlText.Add(xml); } + /// + /// + /// + /// public void Add(XmlNode xml) { this._xmlText.Add(xml.OuterXml); diff --git a/src/NUnitEngine/nunit.engine.api/nunit.engine.api.csproj b/src/NUnitEngine/nunit.engine.api/nunit.engine.api.csproj index e11144055..4dea19528 100644 --- a/src/NUnitEngine/nunit.engine.api/nunit.engine.api.csproj +++ b/src/NUnitEngine/nunit.engine.api/nunit.engine.api.csproj @@ -22,5 +22,9 @@ + + + + diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Transports/Remoting/TestAgentRemotingTransport.cs b/src/NUnitEngine/nunit.engine.core/Communication/Transports/Remoting/TestAgentRemotingTransport.cs index ac8486355..fa5323988 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Transports/Remoting/TestAgentRemotingTransport.cs +++ b/src/NUnitEngine/nunit.engine.core/Communication/Transports/Remoting/TestAgentRemotingTransport.cs @@ -8,6 +8,7 @@ using NUnit.Common; using NUnit.Engine.Agents; using NUnit.Engine.Internal; +using NUnit.Engine.Services; namespace NUnit.Engine.Communication.Transports.Remoting { diff --git a/src/NUnitEngine/nunit.engine.core/Communication/Transports/Tcp/SocketReader.cs b/src/NUnitEngine/nunit.engine.core/Communication/Transports/Tcp/SocketReader.cs index 60223956e..b61ba32dd 100644 --- a/src/NUnitEngine/nunit.engine.core/Communication/Transports/Tcp/SocketReader.cs +++ b/src/NUnitEngine/nunit.engine.core/Communication/Transports/Tcp/SocketReader.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; using System.Net.Sockets; -using NUnit.Engine.Communication.Messages; using NUnit.Engine.Communication.Protocols; +using NUnit.Engine.Communication.Messages; namespace NUnit.Engine.Communication.Transports.Tcp { diff --git a/src/NUnitEngine/nunit.engine.tests/Api/ServiceLocatorTests.cs b/src/NUnitEngine/nunit.engine.tests/Api/ServiceLocatorTests.cs index 32de01907..e7bb456ed 100644 --- a/src/NUnitEngine/nunit.engine.tests/Api/ServiceLocatorTests.cs +++ b/src/NUnitEngine/nunit.engine.tests/Api/ServiceLocatorTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt using System; +using NUnit.Engine.Services; using NUnit.Framework; namespace NUnit.Engine.Api diff --git a/src/NUnitEngine/nunit.engine/Communication/Transports/Tcp/TestAgentTcpProxy.cs b/src/NUnitEngine/nunit.engine/Communication/Transports/Tcp/TestAgentTcpProxy.cs index efb1862d8..f7a6e080f 100644 --- a/src/NUnitEngine/nunit.engine/Communication/Transports/Tcp/TestAgentTcpProxy.cs +++ b/src/NUnitEngine/nunit.engine/Communication/Transports/Tcp/TestAgentTcpProxy.cs @@ -2,8 +2,8 @@ using System; using System.Net.Sockets; -using NUnit.Engine.Communication.Messages; using NUnit.Engine.Communication.Protocols; +using NUnit.Engine.Communication.Messages; namespace NUnit.Engine.Communication.Transports.Tcp { diff --git a/src/NUnitEngine/nunit.engine/Services/RuntimeFrameworkService.cs b/src/NUnitEngine/nunit.engine/Services/RuntimeFrameworkService.cs index c117d328e..f05d10898 100644 --- a/src/NUnitEngine/nunit.engine/Services/RuntimeFrameworkService.cs +++ b/src/NUnitEngine/nunit.engine/Services/RuntimeFrameworkService.cs @@ -9,6 +9,7 @@ using Microsoft.Win32; using NUnit.Common; using NUnit.Engine.Internal; +using NUnit.Engine.Services; using NUnit.Engine.Services.RuntimeLocators; using TestCentric.Metadata; diff --git a/src/NUnitEngine/nunit.engine/Services/TestAgency.cs b/src/NUnitEngine/nunit.engine/Services/TestAgency.cs index 1a7a1e0d2..bc8af88d1 100644 --- a/src/NUnitEngine/nunit.engine/Services/TestAgency.cs +++ b/src/NUnitEngine/nunit.engine/Services/TestAgency.cs @@ -8,6 +8,7 @@ using NUnit.Engine.Internal; using NUnit.Engine.Communication.Transports.Remoting; using NUnit.Engine.Communication.Transports.Tcp; +using NUnit.Engine.Services; namespace NUnit.Engine.Services { diff --git a/src/NUnitEngine/nunit.engine/nunit.engine.csproj b/src/NUnitEngine/nunit.engine/nunit.engine.csproj index d699651e1..d0a64b217 100644 --- a/src/NUnitEngine/nunit.engine/nunit.engine.csproj +++ b/src/NUnitEngine/nunit.engine/nunit.engine.csproj @@ -22,7 +22,6 @@ -