diff --git a/src/NUnit.Engine.Api.Tests/PackageSettingsTests.cs b/src/NUnit.Engine.Api.Tests/PackageSettingsTests.cs index 8a337a3..df4b373 100644 --- a/src/NUnit.Engine.Api.Tests/PackageSettingsTests.cs +++ b/src/NUnit.Engine.Api.Tests/PackageSettingsTests.cs @@ -37,6 +37,16 @@ public static void LookupSettingDefinitionFails() Assert.That(lookup, Is.Null); } + [TestCase("RequestedAgentType")] + [TestCase("SelectedAgentType")] + public static void AgentTypeSettingIsAnEmptyStringByDefault(string name) + { + var definition = SettingDefinitions.Lookup(name); + + Assert.That(definition, Is.TypeOf>()); + Assert.That(((SettingDefinition)definition).DefaultValue, Is.Empty); + } + [Test] public void AddKnownSettingUsingSettingDefinition() { diff --git a/src/NUnit.Engine.Api/SettingDefinitions.cs b/src/NUnit.Engine.Api/SettingDefinitions.cs index 46e8f6c..0813958 100644 --- a/src/NUnit.Engine.Api/SettingDefinitions.cs +++ b/src/NUnit.Engine.Api/SettingDefinitions.cs @@ -137,6 +137,21 @@ static SettingDefinitions() /// public static SettingDefinition SelectedAgentName { get; } = new(nameof(SelectedAgentName), string.Empty); + /// + /// Indicates the type of agent requested by the user. Values are the + /// names of members: "InProcess", + /// "LocalProcess" and "RemoteProcess". If not specified, any type + /// of agent may be used, except that tests only run in-process + /// when that is requested. + /// + public static SettingDefinition RequestedAgentType { get; } = new(nameof(RequestedAgentType), string.Empty); + + /// + /// Indicates the type of agent that was actually used, as the name + /// of a member. + /// + public static SettingDefinition SelectedAgentType { get; } = new(nameof(SelectedAgentType), string.Empty); + /// /// Bool flag indicating that the test should be run in a 32-bit process /// on a 64-bit system. By default, NUNit runs in a 64-bit process on