diff --git a/src/Database/Interfaces/IWorkflowInstanceRepository.cs b/src/Database/Interfaces/IWorkflowInstanceRepository.cs index d5a279289..931a52582 100644 --- a/src/Database/Interfaces/IWorkflowInstanceRepository.cs +++ b/src/Database/Interfaces/IWorkflowInstanceRepository.cs @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache License 2.0 using System.Collections.Generic; -using Monai.Deploy.WorkflowManager.Contracts.Models; using System.Threading.Tasks; using Monai.Deploy.Messaging.Events; +using Monai.Deploy.WorkflowManager.Contracts.Models; namespace Monai.Deploy.WorkflowManager.Database.Interfaces { diff --git a/src/WorkflowManager/Extentions/TaskManagerExtensions.cs b/src/WorkflowManager/Extentions/TaskManagerExtensions.cs new file mode 100644 index 000000000..a58185eb0 --- /dev/null +++ b/src/WorkflowManager/Extentions/TaskManagerExtensions.cs @@ -0,0 +1,28 @@ +// SPDX-FileCopyrightText: © 2022 MONAI Consortium +// SPDX-License-Identifier: Apache License 2.0 + +using Ardalis.GuardClauses; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Options; +using Monai.Deploy.Storage.Configuration; +using Monai.Deploy.WorkflowManager.TaskManager.Argo; + +namespace Monai.Deploy.WorkflowManager.Services +{ + internal static class TaskManagerExtensions + { + public static IServiceCollection AddTaskManager(this IServiceCollection services, HostBuilderContext hostContext) + { + Guard.Against.Null(hostContext, nameof(hostContext)); + + services.AddSingleton(); + services.AddSingleton(); + + services.AddSingleton(); + services.AddHostedService(p => p.GetRequiredService()); + + return services; + } + } +} diff --git a/src/WorkflowManager/Extentions/WorkflowExecutorExtensions.cs b/src/WorkflowManager/Extentions/WorkflowExecutorExtensions.cs new file mode 100644 index 000000000..e97fec3fa --- /dev/null +++ b/src/WorkflowManager/Extentions/WorkflowExecutorExtensions.cs @@ -0,0 +1,51 @@ +// SPDX-FileCopyrightText: © 2022 MONAI Consortium +// SPDX-License-Identifier: Apache License 2.0 + +using Ardalis.GuardClauses; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Monai.Deploy.Storage.API; +using Monai.Deploy.WorkflowManager.Common.Interfaces; +using Monai.Deploy.WorkflowManager.Common.Services; +using Monai.Deploy.WorkflowManager.PayloadListener.Services; +using Monai.Deploy.WorkflowManager.PayloadListener.Validators; +using Monai.Deploy.WorkflowManager.Storage.Services; +using Monai.Deploy.WorkflowManager.WorkfowExecuter.Common; +using Monai.Deploy.WorkflowManager.WorkfowExecuter.Services; +using Monai.Deploy.WorkloadManager.WorkfowExecuter.Common; + +namespace Monai.Deploy.WorkflowManager.Services +{ + internal static class WorkflowExecutorExtensions + { + public static IServiceCollection AddWorkflowExecutor(this IServiceCollection services, HostBuilderContext hostContext) + { + Guard.Against.Null(hostContext, nameof(hostContext)); + + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + + services.AddSingleton(); + services.AddTransient(); + services.AddSingleton(); + services.AddSingleton(); + + services.AddSingleton(s => + { + var logger = s.GetService>(); + var storage = s.GetService(); + var dicomStore = s.GetService(); + + return new ConditionalParameterParser(logger, storage, dicomStore); + }); + + services.AddSingleton(); + services.AddHostedService(p => p.GetService()); + + return services; + } + } +} diff --git a/src/WorkflowManager/Monai.Deploy.WorkflowManager.csproj b/src/WorkflowManager/Monai.Deploy.WorkflowManager.csproj index d745f0182..8d5264031 100644 --- a/src/WorkflowManager/Monai.Deploy.WorkflowManager.csproj +++ b/src/WorkflowManager/Monai.Deploy.WorkflowManager.csproj @@ -51,6 +51,8 @@ SPDX-License-Identifier: Apache License 2.0 + + diff --git a/src/WorkflowManager/Program.cs b/src/WorkflowManager/Program.cs index e3fb1c9fc..dfdd228a9 100644 --- a/src/WorkflowManager/Program.cs +++ b/src/WorkflowManager/Program.cs @@ -23,8 +23,7 @@ using Monai.Deploy.WorkflowManager.Database; using Monai.Deploy.WorkflowManager.Database.Interfaces; using Monai.Deploy.WorkflowManager.Database.Options; -using Monai.Deploy.WorkflowManager.PayloadListener.Services; -using Monai.Deploy.WorkflowManager.PayloadListener.Validators; +using Monai.Deploy.WorkflowManager.Services; using Monai.Deploy.WorkflowManager.Services.DataRetentionService; using Monai.Deploy.WorkflowManager.Services.Http; using Monai.Deploy.WorkflowManager.Storage.Services; @@ -88,11 +87,8 @@ internal static IHostBuilder CreateHostBuilder(string[] args) => services.AddHostedService(p => p.GetService()); // Services - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); services.AddTransient(); + services.AddHttpClient(); // Mongo DB services.Configure(hostContext.Configuration.GetSection("WorkloadManagerDatabase")); @@ -108,23 +104,10 @@ internal static IHostBuilder CreateHostBuilder(string[] args) => services.AddMonaiDeployMessageBrokerPublisherService(hostContext.Configuration.GetSection("WorkflowManager:messaging:publisherServiceAssemblyName").Value); services.AddMonaiDeployMessageBrokerSubscriberService(hostContext.Configuration.GetSection("WorkflowManager:messaging:subscriberServiceAssemblyName").Value); - services.AddSingleton(s => - { - var logger = s.GetService>(); - var storage = s.GetService(); - var dicomStore = s.GetService(); + services.AddHostedService(p => p.GetService()); - return new ConditionalParameterParser(logger, storage, dicomStore); - }); - - services.AddSingleton(); - services.AddTransient(); - services.AddSingleton(); - services.AddSingleton(); - - services.AddSingleton(); - - services.AddHostedService(p => p.GetService()); + services.AddTaskManager(hostContext); + services.AddWorkflowExecutor(hostContext); }) .ConfigureWebHostDefaults(webBuilder => { @@ -135,6 +118,12 @@ internal static IHostBuilder CreateHostBuilder(string[] args) => private static void Main(string[] args) { var host = CreateHostBuilder(args).Build(); + + if (args.Length == 0) + { + host.Services.GetService().StartAsync(System.Threading.CancellationToken.None).RunSynchronously(); + } + host.Run(); } diff --git a/src/WorkflowManager/packages.lock.json b/src/WorkflowManager/packages.lock.json index dc3a5951e..6b9ee3f68 100644 --- a/src/WorkflowManager/packages.lock.json +++ b/src/WorkflowManager/packages.lock.json @@ -175,6 +175,15 @@ "Swashbuckle.AspNetCore.SwaggerUI": "6.3.0" } }, + "AutoMapper": { + "type": "Transitive", + "resolved": "10.1.1", + "contentHash": "uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + } + }, "AWSSDK.Core": { "type": "Transitive", "resolved": "3.7.12.2", @@ -204,11 +213,65 @@ "Microsoft.Win32.Registry": "5.0.0" } }, + "Fractions": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "1uv2IqQ6AsLtrcsibOTEyyHLQpxgjONssPrI0Ug84AIuSVqVDcotaNkTaJTprFvxbCNi7Kp/3WAAtnytuQP3qQ==", + "dependencies": { + "System.Runtime.Numerics": "4.3.0" + } + }, + "IdentityModel": { + "type": "Transitive", + "resolved": "5.2.0", + "contentHash": "nuhkbaDH9l5QzNJp2MtP3qio57MPtiRneUN8Ocr7od0JvSYaIe3gBj/vxllr11S/Qvu1AG4GZXoyv5469ewYDA==" + }, + "IdentityModel.OidcClient": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "4KTG0+M3UBxr0UraGo8MfqEGT9MeMDtaBvPyZccmwW+JH+UG3psW5IVITKgobpgWmK+OKoE2FQQ4XBlaLfyCyw==", + "dependencies": { + "IdentityModel": "5.2.0", + "Microsoft.Extensions.Logging": "6.0.0" + } + }, "JetBrains.Annotations": { "type": "Transitive", "resolved": "2021.3.0", "contentHash": "Ddxjs5RRjf+c8m9m++WvhW1lz1bqNhsTjWvCLbQN9bvKbkJeR9MhtfNwKgBRRdG2yLHcXFr5Lf7fsvvkiPaDRg==" }, + "KubernetesClient": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "wycP/ApzjNToo6N0is0cDVK6m282MOXSlJDaZPmMibpdgZf2MKjS289MRUIXz3+Syftu4zsqlinDMGbmi5Xjog==", + "dependencies": { + "IdentityModel.OidcClient": "4.0.0", + "KubernetesClient.Basic": "7.2.19", + "KubernetesClient.Models": "7.2.19", + "System.IO.Abstractions": "13.2.47", + "System.IdentityModel.Tokens.Jwt": "6.13.1", + "prometheus-net": "5.0.1" + } + }, + "KubernetesClient.Basic": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "1LboFwnEg9gxB8gF9BqaS8gnNVetqRGS9XWyVMlzAxpeYaTF5mNCoj4OCZyLj8Ogo0kdrASjG9qOjozpQDWZlg==", + "dependencies": { + "KubernetesClient.Models": "7.2.19" + } + }, + "KubernetesClient.Models": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "ekEK90+eJTKN1KzW7kFcJofSjv3X+Q4MhLxAZdgn7pTCJg0qk4/FhV8sYJ/ZMw20Ue5Rob3vAw9WROHZaLNIdQ==", + "dependencies": { + "AutoMapper": "10.1.1", + "Fractions": "7.0.0", + "System.Text.Json": "6.0.2", + "YamlDotNet": "11.2.1" + } + }, "Microsoft.AspNetCore.JsonPatch": { "type": "Transitive", "resolved": "6.0.3", @@ -378,6 +441,16 @@ "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0" } }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "3.1.9", + "contentHash": "sRyrkBJGS+8ucKak+RmAPkAiIm6amA5ztpIkp0zrPn5+kDX2j8XJdRARr4Eh003RIGQxzvNGQ+j/voAhlPoXyw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.9", + "Microsoft.Extensions.Logging": "3.1.9", + "Microsoft.Extensions.Options": "3.1.9" + } + }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", "resolved": "6.0.1", @@ -454,6 +527,29 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "Microsoft.IdentityModel.JsonWebTokens": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "seLGCIo8bDz93PGgKY9vV4PAHpu1iXwH4Xm6O+HOJbIcnpiJz4f4C/MVFKfOb+yKGMtix2qyFkQMKOdVmArn0Q==", + "dependencies": { + "Microsoft.IdentityModel.Tokens": "6.13.1" + } + }, + "Microsoft.IdentityModel.Logging": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "pUr0kicIy3cNgrapB7old+N+OithDcowO/uqOg/z9dMC8u25/1YS7QirJWKi/0z31fBOE/uEFBHfSfnRCKRxsA==" + }, + "Microsoft.IdentityModel.Tokens": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "tUTbP9/wMuOGDiTBPXEN24M9rVAEJ8EOvk4pwoo5UKRNUK3bAZYqkzFpcgNOAY3PHHjwZJ2stk4Gf5jvspz0yg==", + "dependencies": { + "Microsoft.CSharp": "4.5.0", + "Microsoft.IdentityModel.Logging": "6.13.1", + "System.Security.Cryptography.Cng": "4.5.0" + } + }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "5.0.0", @@ -579,6 +675,14 @@ "Newtonsoft.Json": "12.0.1" } }, + "prometheus-net": { + "type": "Transitive", + "resolved": "5.0.1", + "contentHash": "tg+vGeKCUqaWPzHAuKI87/rqQD4RKjb/jlRqSPaAdGRFd/SFDFRHPE8Rcy5Rx2f4xqdR+s3qTQ/0Y/IHbI3D1Q==", + "dependencies": { + "Microsoft.Extensions.Http": "3.1.9" + } + }, "RabbitMQ.Client": { "type": "Transitive", "resolved": "6.4.0", @@ -824,6 +928,15 @@ "System.Runtime.InteropServices": "4.3.0" } }, + "System.IdentityModel.Tokens.Jwt": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "BTVPnmvqpKxv+ucl3Ii7HnRVvXvfm/P5iq3rnTnJ0YuneZUS7zGtE+DRrVQWSd431ntjZuHBGPbjaB+nCSq9Uw==", + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "6.13.1", + "Microsoft.IdentityModel.Tokens": "6.13.1" + } + }, "System.IO": { "type": "Transitive", "resolved": "4.3.0", @@ -951,6 +1064,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1063,21 +1181,8 @@ }, "System.Security.Cryptography.Cng": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } + "resolved": "4.5.0", + "contentHash": "WG3r7EyjUe9CMPFSs6bty5doUqT+q9pbI80hlNzo2SkPkZ4VTuZkGWjpp77JB8+uaL4DFPRdBsAY+DX3dBK92A==" }, "System.Security.Cryptography.Csp": { "type": "Transitive", @@ -1209,8 +1314,8 @@ }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "6.0.2", + "contentHash": "0nE2gwXLn3PTBOPwORLqwuYvWB+Beomt9ZBX+6LmogMNKUvfD1SoDb/ycB1vBntT94rGaB/SvxEyeLu14H6aEg==", "dependencies": { "System.Runtime.CompilerServices.Unsafe": "6.0.0", "System.Text.Encodings.Web": "6.0.0" @@ -1250,6 +1355,11 @@ "resolved": "4.4.0", "contentHash": "BahUww/+mdP4ARCAh2RQhQTg13wYLVrBb9SYVgW8ZlrwjraGCXHGjo0oIiUfZ34LUZkMMR+RAzR7dEY4S1HeQQ==" }, + "YamlDotNet": { + "type": "Transitive", + "resolved": "11.2.1", + "contentHash": "tBt8K+korVfrjH9wyDEhiLKxbs8qoLCLIFwvYgkSUuMC9//w3z0cFQ8LQAI/5MCKq+BMil0cfRTRvPeE7eXhQw==" + }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -1332,6 +1442,42 @@ "Monai.Deploy.WorkflowManager.Logging": "1.0.0" } }, + "monai.deploy.workflowmanager.taskmanager": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Hosting": "6.0.1", + "Microsoft.Extensions.Hosting.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.1", + "Microsoft.Extensions.Options": "6.0.0", + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060", + "Monai.Deploy.WorkflowManager.Common": "1.0.0", + "Monai.Deploy.WorkflowManager.Configuration": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager.API": "1.0.0" + } + }, + "monai.deploy.workflowmanager.taskmanager.api": { + "type": "Project", + "dependencies": { + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060" + } + }, + "monai.deploy.workflowmanager.taskmanager.argo": { + "type": "Project", + "dependencies": { + "IdentityModel.OidcClient": "5.0.0", + "KubernetesClient": "7.2.19", + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060", + "Monai.Deploy.WorkflowManager.Common": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager.API": "1.0.0", + "Newtonsoft.Json": "13.0.1" + } + }, "monai.deploy.workloadmanager.workfowexecuter": { "type": "Project", "dependencies": { diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskDestinations.feature.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskDestinations.feature.cs index 15849e4fa..b764090a4 100644 --- a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskDestinations.feature.cs +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskDestinations.feature.cs @@ -1,296 +1,296 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("TaskDestinations")] - public partial class TaskDestinationsFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "TaskDestinations.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TaskDestinations", "New task is dispatched after a Task update message is received.", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which triggers a single new task")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - public virtual void PublishAValidTaskUpdateEventWhichTriggersASingleNewTask() - { - string[] tagsOfScenario = new string[] { - "TaskUpdate"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which triggers a single new task", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 6 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 7 - testRunner.Given("I have a clinical workflow Multi_Task_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 8 - testRunner.And("I have a Workflow Instance WFI_Multi_Task_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.When("I publish a Task Update Message Task_Update_To_Dispatch_Single_Task with status S" + - "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 10 - testRunner.Then("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 11 - testRunner.And("Workflow Instance is updated with the new Task", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 12 - testRunner.And("I can see the status of the Tasks are updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 13 - testRunner.And("Workflow Instance status is Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which triggers multiple new tasks")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - public virtual void PublishAValidTaskUpdateEventWhichTriggersMultipleNewTasks() - { - string[] tagsOfScenario = new string[] { - "TaskUpdate"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which triggers multiple new tasks", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 16 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 17 - testRunner.Given("I have a clinical workflow Multi_Task_Workflow_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 18 - testRunner.And("I have a Workflow Instance WFI_Multi_Task_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 19 - testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Multi_Tasks with status Su" + - "cceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 20 - testRunner.Then("2 Task Dispatch events are published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 21 - testRunner.And("Workflow Instance is updated with the new Tasks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 22 - testRunner.And("I can see the status of the Tasks are updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 23 - testRunner.And("Workflow Instance status is Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event where the next Task is not of status Created an" + - "d see that a Task Dispatch event is not created")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Dispatched", null)] - [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Accepted", null)] - [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Succeeded", null)] - public virtual void PublishAValidTaskUpdateEventWhereTheNextTaskIsNotOfStatusCreatedAndSeeThatATaskDispatchEventIsNotCreated(string workflowInstance, string[] exampleTags) - { - string[] @__tags = new string[] { - "TaskUpdate"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("workflowInstance", workflowInstance); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event where the next Task is not of status Created an" + - "d see that a Task Dispatch event is not created", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 26 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 27 - testRunner.Given("I have a clinical workflow Multi_Task_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 28 - testRunner.And(string.Format("I have a Workflow Instance {0}", workflowInstance), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 29 - testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Su" + - "cceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 30 - testRunner.Then("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event as failed which does not trigger a new task and" + - " updates the workflow status to Failed")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - public virtual void PublishAValidTaskUpdateEventAsFailedWhichDoesNotTriggerANewTaskAndUpdatesTheWorkflowStatusToFailed() - { - string[] tagsOfScenario = new string[] { - "TaskUpdate"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event as failed which does not trigger a new task and" + - " updates the workflow status to Failed", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 38 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 39 - testRunner.Given("I have a clinical workflow Multi_Task_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 40 - testRunner.And("I have a Workflow Instance WFI_Multi_Task_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 41 - testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Fa" + - "iled", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 42 - testRunner.Then("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 43 - testRunner.And("Workflow Instance status is Failed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("TaskDestinations")] + public partial class TaskDestinationsFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private string[] _featureTags = ((string[])(null)); + +#line 1 "TaskDestinations.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TaskDestinations", "New task is dispatched after a Task update message is received.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public virtual void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public virtual void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which triggers a single new task")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + public virtual void PublishAValidTaskUpdateEventWhichTriggersASingleNewTask() + { + string[] tagsOfScenario = new string[] { + "TaskUpdate"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which triggers a single new task", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 6 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 7 + testRunner.Given("I have a clinical workflow Multi_Task_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 8 + testRunner.And("I have a Workflow Instance WFI_Multi_Task_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 + testRunner.When("I publish a Task Update Message Task_Update_To_Dispatch_Single_Task with status S" + + "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 10 + testRunner.Then("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 11 + testRunner.And("Workflow Instance is updated with the new Task", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 12 + testRunner.And("I can see the status of the Tasks are updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 13 + testRunner.And("Workflow Instance status is Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which triggers multiple new tasks")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + public virtual void PublishAValidTaskUpdateEventWhichTriggersMultipleNewTasks() + { + string[] tagsOfScenario = new string[] { + "TaskUpdate"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which triggers multiple new tasks", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 16 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 17 + testRunner.Given("I have a clinical workflow Multi_Task_Workflow_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 18 + testRunner.And("I have a Workflow Instance WFI_Multi_Task_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 19 + testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Multi_Tasks with status Su" + + "cceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 20 + testRunner.Then("2 Task Dispatch events are published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 21 + testRunner.And("Workflow Instance is updated with the new Tasks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 22 + testRunner.And("I can see the status of the Tasks are updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 23 + testRunner.And("Workflow Instance status is Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event where the next Task is not of status Created an" + + "d see that a Task Dispatch event is not created")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Dispatched", null)] + [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Accepted", null)] + [NUnit.Framework.TestCaseAttribute("WFI_Multi_Task_Succeeded", null)] + public virtual void PublishAValidTaskUpdateEventWhereTheNextTaskIsNotOfStatusCreatedAndSeeThatATaskDispatchEventIsNotCreated(string workflowInstance, string[] exampleTags) + { + string[] @__tags = new string[] { + "TaskUpdate"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("workflowInstance", workflowInstance); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event where the next Task is not of status Created an" + + "d see that a Task Dispatch event is not created", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 26 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 27 + testRunner.Given("I have a clinical workflow Multi_Task_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 28 + testRunner.And(string.Format("I have a Workflow Instance {0}", workflowInstance), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 29 + testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Su" + + "cceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 30 + testRunner.Then("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event as failed which does not trigger a new task and" + + " updates the workflow status to Failed")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + public virtual void PublishAValidTaskUpdateEventAsFailedWhichDoesNotTriggerANewTaskAndUpdatesTheWorkflowStatusToFailed() + { + string[] tagsOfScenario = new string[] { + "TaskUpdate"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event as failed which does not trigger a new task and" + + " updates the workflow status to Failed", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 38 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 39 + testRunner.Given("I have a clinical workflow Multi_Task_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 40 + testRunner.And("I have a Workflow Instance WFI_Multi_Task_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 41 + testRunner.When("I publish a Task Update Message Task_Update_Dispatches_Single_Task with status Fa" + + "iled", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 42 + testRunner.Then("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 43 + testRunner.And("Workflow Instance status is Failed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskStatusUpdate.feature.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskStatusUpdate.feature.cs index 32196c13e..6ffa833c2 100644 --- a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskStatusUpdate.feature.cs +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/TaskStatusUpdate.feature.cs @@ -1,340 +1,340 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("TaskStatusUpdate")] - public partial class TaskStatusUpdateFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "TaskStatusUpdate.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TaskStatusUpdate", "Update task status in the workflow instance from a Task Update Event", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which updates the Task status")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - [NUnit.Framework.TestCaseAttribute("Accepted", null)] - [NUnit.Framework.TestCaseAttribute("Succeeded", null)] - [NUnit.Framework.TestCaseAttribute("Failed", null)] - [NUnit.Framework.TestCaseAttribute("Canceled", null)] - public virtual void PublishAValidTaskUpdateEventWhichUpdatesTheTaskStatus(string taskUpdateStatus, string[] exampleTags) - { - string[] @__tags = new string[] { - "TaskUpdate"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("taskUpdateStatus", taskUpdateStatus); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which updates the Task status", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 6 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 7 - testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 8 - testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.When(string.Format("I publish a Task Update Message Task_Status_Update with status {0}", taskUpdateStatus), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 10 - testRunner.Then("I can see the status of the Task is updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event that where WorkflowInstance does not contain Ta" + - "skId")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - public virtual void PublishAValidTaskUpdateEventThatWhereWorkflowInstanceDoesNotContainTaskId() - { - string[] tagsOfScenario = new string[] { - "TaskUpdate"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event that where WorkflowInstance does not contain Ta" + - "skId", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 19 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 20 - testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 21 - testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 22 - testRunner.When("I publish a Task Update Message Task_Status_Update_TaskId_Not_Found with status S" + - "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 23 - testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish an invalid Task Update event which does not update the task status")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_TaskId", null)] - [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_ExecutionId", null)] - [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_CorrelationId", null)] - [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_Status", null)] - public virtual void PublishAnInvalidTaskUpdateEventWhichDoesNotUpdateTheTaskStatus(string taskUpdateMessage, string[] exampleTags) - { - string[] @__tags = new string[] { - "TaskUpdate"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("taskUpdateMessage", taskUpdateMessage); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an invalid Task Update event which does not update the task status", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 26 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 27 - testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 28 - testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 29 - testRunner.When(string.Format("I publish a Task Update Message {0} with status Succeeded", taskUpdateMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 30 - testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish an valid Task Update event with a status that is invalid for current stat" + - "us")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Succeeded", "Task_Status_Update_Status_Invalid_When_Succeeded", "Accepted", null)] - [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Failed", "Task_Status_Update_Status_Invalid_When_Failed", "Accepted", null)] - [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Canceled", "Task_Status_Update_Status_Invalid_When_Canceled", "Accepted", null)] - public virtual void PublishAnValidTaskUpdateEventWithAStatusThatIsInvalidForCurrentStatus(string existingWFI, string taskUpdateMessage, string taskUpdateStatus, string[] exampleTags) - { - string[] @__tags = new string[] { - "TaskUpdate"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("existingWFI", existingWFI); - argumentsOfScenario.Add("taskUpdateMessage", taskUpdateMessage); - argumentsOfScenario.Add("taskUpdateStatus", taskUpdateStatus); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an valid Task Update event with a status that is invalid for current stat" + - "us", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 39 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 40 - testRunner.Given(string.Format("I have a Workflow Instance {0}", existingWFI), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 41 - testRunner.When(string.Format("I publish a Task Update Message {0} with status {1}", taskUpdateMessage, taskUpdateStatus), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 42 - testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Workflow task update test for bucket minio")] - [NUnit.Framework.CategoryAttribute("TaskUpdate")] - public virtual void WorkflowTaskUpdateTestForBucketMinio() - { - string[] tagsOfScenario = new string[] { - "TaskUpdate"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Workflow task update test for bucket minio", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 50 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 51 - testRunner.Given("I have a clinical workflow Workflow_Revision_for_bucket_minio", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 52 - testRunner.And("I have a Workflow Instance Workflow_instance_for_bucket_minio", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 53 - testRunner.And("I have a payload donkeypayload and bucket in MinIO donkeybucket", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 54 - testRunner.When("I publish a Task Update Message Task_status_update_for_bucket_minio with status S" + - "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 55 - testRunner.Then("I can see the status of the Task is Succeeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("TaskStatusUpdate")] + public partial class TaskStatusUpdateFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private string[] _featureTags = ((string[])(null)); + +#line 1 "TaskStatusUpdate.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TaskStatusUpdate", "Update task status in the workflow instance from a Task Update Event", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public virtual void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public virtual void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event which updates the Task status")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + [NUnit.Framework.TestCaseAttribute("Accepted", null)] + [NUnit.Framework.TestCaseAttribute("Succeeded", null)] + [NUnit.Framework.TestCaseAttribute("Failed", null)] + [NUnit.Framework.TestCaseAttribute("Canceled", null)] + public virtual void PublishAValidTaskUpdateEventWhichUpdatesTheTaskStatus(string taskUpdateStatus, string[] exampleTags) + { + string[] @__tags = new string[] { + "TaskUpdate"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("taskUpdateStatus", taskUpdateStatus); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event which updates the Task status", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 6 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 7 + testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 8 + testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 + testRunner.When(string.Format("I publish a Task Update Message Task_Status_Update with status {0}", taskUpdateStatus), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 10 + testRunner.Then("I can see the status of the Task is updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid Task Update event that where WorkflowInstance does not contain Ta" + + "skId")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + public virtual void PublishAValidTaskUpdateEventThatWhereWorkflowInstanceDoesNotContainTaskId() + { + string[] tagsOfScenario = new string[] { + "TaskUpdate"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid Task Update event that where WorkflowInstance does not contain Ta" + + "skId", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 19 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 20 + testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 21 + testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 22 + testRunner.When("I publish a Task Update Message Task_Status_Update_TaskId_Not_Found with status S" + + "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 23 + testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish an invalid Task Update event which does not update the task status")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_TaskId", null)] + [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_ExecutionId", null)] + [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_CorrelationId", null)] + [NUnit.Framework.TestCaseAttribute("Task_Status_Update_Missing_Status", null)] + public virtual void PublishAnInvalidTaskUpdateEventWhichDoesNotUpdateTheTaskStatus(string taskUpdateMessage, string[] exampleTags) + { + string[] @__tags = new string[] { + "TaskUpdate"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("taskUpdateMessage", taskUpdateMessage); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an invalid Task Update event which does not update the task status", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 26 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 27 + testRunner.Given("I have a clinical workflow Task_Status_Update_Workflow", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 28 + testRunner.And("I have a Workflow Instance WFI_Task_Status_Update", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 29 + testRunner.When(string.Format("I publish a Task Update Message {0} with status Succeeded", taskUpdateMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 30 + testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish an valid Task Update event with a status that is invalid for current stat" + + "us")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Succeeded", "Task_Status_Update_Status_Invalid_When_Succeeded", "Accepted", null)] + [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Failed", "Task_Status_Update_Status_Invalid_When_Failed", "Accepted", null)] + [NUnit.Framework.TestCaseAttribute("WFI_Task_Status_Canceled", "Task_Status_Update_Status_Invalid_When_Canceled", "Accepted", null)] + public virtual void PublishAnValidTaskUpdateEventWithAStatusThatIsInvalidForCurrentStatus(string existingWFI, string taskUpdateMessage, string taskUpdateStatus, string[] exampleTags) + { + string[] @__tags = new string[] { + "TaskUpdate"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("existingWFI", existingWFI); + argumentsOfScenario.Add("taskUpdateMessage", taskUpdateMessage); + argumentsOfScenario.Add("taskUpdateStatus", taskUpdateStatus); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an valid Task Update event with a status that is invalid for current stat" + + "us", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 39 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 40 + testRunner.Given(string.Format("I have a Workflow Instance {0}", existingWFI), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 41 + testRunner.When(string.Format("I publish a Task Update Message {0} with status {1}", taskUpdateMessage, taskUpdateStatus), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 42 + testRunner.Then("I can see the status of the Task is not updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Workflow task update test for bucket minio")] + [NUnit.Framework.CategoryAttribute("TaskUpdate")] + public virtual void WorkflowTaskUpdateTestForBucketMinio() + { + string[] tagsOfScenario = new string[] { + "TaskUpdate"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Workflow task update test for bucket minio", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 50 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 51 + testRunner.Given("I have a clinical workflow Workflow_Revision_for_bucket_minio", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 52 + testRunner.And("I have a Workflow Instance Workflow_instance_for_bucket_minio", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 53 + testRunner.And("I have a payload donkeypayload and bucket in MinIO donkeybucket", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 54 + testRunner.When("I publish a Task Update Message Task_status_update_for_bucket_minio with status S" + + "ucceeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 55 + testRunner.Then("I can see the status of the Task is Succeeded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowApi.feature.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowApi.feature.cs index 7dd298d0a..55f3e1844 100644 --- a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowApi.feature.cs +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowApi.feature.cs @@ -1,748 +1,748 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("WorkflowApi")] - public partial class WorkflowApiFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "WorkflowApi.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowApi", "API to interact with WorkflowRevisions collection", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - Single workflow")] - [NUnit.Framework.CategoryAttribute("GetWorkflows")] - public virtual void GetAllClinicalWorkflowsFromAPI_SingleWorkflow() - { - string[] tagsOfScenario = new string[] { - "GetWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - Single workflow", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 6 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 7 - testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 8 - testRunner.And("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 10 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 11 - testRunner.And("I can see 1 workflow is returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - Multiple workflows")] - [NUnit.Framework.CategoryAttribute("GetWorkflows")] - public virtual void GetAllClinicalWorkflowsFromAPI_MultipleWorkflows() - { - string[] tagsOfScenario = new string[] { - "GetWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - Multiple workflows", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 14 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 15 - testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 16 - testRunner.And("I have a clinical workflow Basic_Workflow_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 17 - testRunner.And("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 18 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 19 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 20 - testRunner.And("I can see 2 workflows are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - No workflows")] - [NUnit.Framework.CategoryAttribute("GetWorkflows")] - public virtual void GetAllClinicalWorkflowsFromAPI_NoWorkflows() - { - string[] tagsOfScenario = new string[] { - "GetWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - No workflows", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 23 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 24 - testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 25 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 26 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 27 - testRunner.And("I can see 0 workflows are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Update workflow with valid details")] - [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] - public virtual void UpdateWorkflowWithValidDetails() - { - string[] tagsOfScenario = new string[] { - "UpdateWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow with valid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 30 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 31 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 32 - testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 33 - testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 34 - testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 35 - testRunner.Then("I will get a 201 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 36 - testRunner.And("the Id c86a437d-d026-4bdf-b1df-c7a6372b89e3 is returned in the response body", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 37 - testRunner.And("multiple workflow revisions now exist with correct details", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Update workflow with invalid details")] - [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] - [NUnit.Framework.TestCaseAttribute("/workflows/1", "Basic_Workflow_Update_1", "Failed to validate id, not a valid guid", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_Name_Length", "is not a valid Workflow Name", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_Desc_Length", "is not a valid Workflow Description", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_AETitle_Length", "is not a valid AE Title", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_DataOrg", "is not a valid Informatics Gateway - dataOrigins", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_ExportDest", "is not a valid Informatics Gateway - exportDestinations", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskDesc_Length", "is not a valid taskDescription", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskType_Length", "is not a valid taskType", null)] - [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskArgs", "is not a valid args", null)] - public virtual void UpdateWorkflowWithInvalidDetails(string endpoint, string put_Body, string message, string[] exampleTags) - { - string[] @__tags = new string[] { - "UpdateWorkflows"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("endpoint", endpoint); - argumentsOfScenario.Add("put_body", put_Body); - argumentsOfScenario.Add("message", message); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow with invalid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 40 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 41 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 42 - testRunner.And(string.Format("I have an endpoint {0}", endpoint), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 43 - testRunner.And(string.Format("I have a body {0}", put_Body), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 44 - testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 45 - testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 46 - testRunner.And(string.Format("I will recieve the error message {0}", message), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Update workflow where workflow ID does not exist")] - [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] - public virtual void UpdateWorkflowWhereWorkflowIDDoesNotExist() - { - string[] tagsOfScenario = new string[] { - "UpdateWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow where workflow ID does not exist", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 60 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 61 - testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 62 - testRunner.And("I have an endpoint /workflows/52b87b54-a728-4796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 63 - testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 64 - testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 65 - testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 66 - testRunner.And("I will recieve the error message Failed to find workflow with Id: 52b87b54-a728-4" + - "796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete a workflow with one revision")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteAWorkflowWithOneRevision() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow with one revision", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 69 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 70 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 71 - testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 72 - testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 73 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 74 - testRunner.And("all revisions of the workflow are marked as deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete a workflow with multiple revisions")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteAWorkflowWithMultipleRevisions() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow with multiple revisions", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 77 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 78 - testRunner.Given("I have a clinical workflow Basic_Workflow_multiple_revisions_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 79 - testRunner.And("I have a clinical workflow Basic_Workflow_multiple_revisions_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 80 - testRunner.And("I have an endpoint /workflows/570611d3-ad74-43a4-ae84-539164ee8f0c", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 81 - testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 82 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 83 - testRunner.And("all revisions of the workflow are marked as deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete workflow with invalid details")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteWorkflowWithInvalidDetails() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete workflow with invalid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 86 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 87 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 88 - testRunner.And("I have an endpoint /workflows/1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 89 - testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 90 - testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 91 - testRunner.And("I will recieve the error message Failed to validate id, not a valid guid", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete workflow where workflow ID does not exist")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteWorkflowWhereWorkflowIDDoesNotExist() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete workflow where workflow ID does not exist", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 94 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 95 - testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 96 - testRunner.And("I have an endpoint /workflows/52b87b54-a728-4796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 97 - testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 98 - testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 99 - testRunner.And("I will recieve the error message Failed to validate id, workflow not found", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to GET by ID")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteAWorkflowAndRecieve404WhenTryingToGETByID() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to GET by ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 102 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 103 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 104 - testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 105 - testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 106 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 107 - testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 108 - testRunner.And("I will recieve the error message Failed to validate id, workflow not found", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to UPDATE by ID")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteAWorkflowAndRecieve404WhenTryingToUPDATEByID() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to UPDATE by ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 111 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 112 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 113 - testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 114 - testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 115 - testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 116 - testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 117 - testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 118 - testRunner.And("I will recieve the error message Failed to find workflow with Id: c86a437d-d026-4" + - "bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to GET all")] - [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] - public virtual void DeleteAWorkflowAndRecieve404WhenTryingToGETAll() - { - string[] tagsOfScenario = new string[] { - "DeleteWorkflows"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to GET all", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 121 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 122 - testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 123 - testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 124 - testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 125 - testRunner.And("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 126 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 127 - testRunner.Then("the deleted workflow is not returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("WorkflowApi")] + public partial class WorkflowApiFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private string[] _featureTags = ((string[])(null)); + +#line 1 "WorkflowApi.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowApi", "API to interact with WorkflowRevisions collection", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public virtual void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public virtual void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - Single workflow")] + [NUnit.Framework.CategoryAttribute("GetWorkflows")] + public virtual void GetAllClinicalWorkflowsFromAPI_SingleWorkflow() + { + string[] tagsOfScenario = new string[] { + "GetWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - Single workflow", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 6 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 7 + testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 8 + testRunner.And("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 10 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 11 + testRunner.And("I can see 1 workflow is returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - Multiple workflows")] + [NUnit.Framework.CategoryAttribute("GetWorkflows")] + public virtual void GetAllClinicalWorkflowsFromAPI_MultipleWorkflows() + { + string[] tagsOfScenario = new string[] { + "GetWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - Multiple workflows", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 14 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 15 + testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 16 + testRunner.And("I have a clinical workflow Basic_Workflow_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 17 + testRunner.And("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 18 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 19 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 20 + testRunner.And("I can see 2 workflows are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all clinical workflows from API - No workflows")] + [NUnit.Framework.CategoryAttribute("GetWorkflows")] + public virtual void GetAllClinicalWorkflowsFromAPI_NoWorkflows() + { + string[] tagsOfScenario = new string[] { + "GetWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all clinical workflows from API - No workflows", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 23 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 24 + testRunner.Given("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 25 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 26 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 27 + testRunner.And("I can see 0 workflows are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Update workflow with valid details")] + [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] + public virtual void UpdateWorkflowWithValidDetails() + { + string[] tagsOfScenario = new string[] { + "UpdateWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow with valid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 30 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 31 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 32 + testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 33 + testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 34 + testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 35 + testRunner.Then("I will get a 201 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 36 + testRunner.And("the Id c86a437d-d026-4bdf-b1df-c7a6372b89e3 is returned in the response body", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 37 + testRunner.And("multiple workflow revisions now exist with correct details", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Update workflow with invalid details")] + [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] + [NUnit.Framework.TestCaseAttribute("/workflows/1", "Basic_Workflow_Update_1", "Failed to validate id, not a valid guid", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_Name_Length", "is not a valid Workflow Name", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_Desc_Length", "is not a valid Workflow Description", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_AETitle_Length", "is not a valid AE Title", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_DataOrg", "is not a valid Informatics Gateway - dataOrigins", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_ExportDest", "is not a valid Informatics Gateway - exportDestinations", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskDesc_Length", "is not a valid taskDescription", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskType_Length", "is not a valid taskType", null)] + [NUnit.Framework.TestCaseAttribute("/workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", "Invalid_Workflow_Update_TaskArgs", "is not a valid args", null)] + public virtual void UpdateWorkflowWithInvalidDetails(string endpoint, string put_Body, string message, string[] exampleTags) + { + string[] @__tags = new string[] { + "UpdateWorkflows"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("endpoint", endpoint); + argumentsOfScenario.Add("put_body", put_Body); + argumentsOfScenario.Add("message", message); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow with invalid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 40 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 41 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 42 + testRunner.And(string.Format("I have an endpoint {0}", endpoint), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 43 + testRunner.And(string.Format("I have a body {0}", put_Body), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 44 + testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 45 + testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 46 + testRunner.And(string.Format("I will recieve the error message {0}", message), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Update workflow where workflow ID does not exist")] + [NUnit.Framework.CategoryAttribute("UpdateWorkflows")] + public virtual void UpdateWorkflowWhereWorkflowIDDoesNotExist() + { + string[] tagsOfScenario = new string[] { + "UpdateWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update workflow where workflow ID does not exist", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 60 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 61 + testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 62 + testRunner.And("I have an endpoint /workflows/52b87b54-a728-4796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 63 + testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 64 + testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 65 + testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 66 + testRunner.And("I will recieve the error message Failed to find workflow with Id: 52b87b54-a728-4" + + "796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete a workflow with one revision")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteAWorkflowWithOneRevision() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow with one revision", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 69 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 70 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 71 + testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 72 + testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 73 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 74 + testRunner.And("all revisions of the workflow are marked as deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete a workflow with multiple revisions")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteAWorkflowWithMultipleRevisions() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow with multiple revisions", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 77 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 78 + testRunner.Given("I have a clinical workflow Basic_Workflow_multiple_revisions_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 79 + testRunner.And("I have a clinical workflow Basic_Workflow_multiple_revisions_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 80 + testRunner.And("I have an endpoint /workflows/570611d3-ad74-43a4-ae84-539164ee8f0c", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 81 + testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 82 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 83 + testRunner.And("all revisions of the workflow are marked as deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete workflow with invalid details")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteWorkflowWithInvalidDetails() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete workflow with invalid details", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 86 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 87 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 88 + testRunner.And("I have an endpoint /workflows/1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 89 + testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 90 + testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 91 + testRunner.And("I will recieve the error message Failed to validate id, not a valid guid", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete workflow where workflow ID does not exist")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteWorkflowWhereWorkflowIDDoesNotExist() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete workflow where workflow ID does not exist", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 94 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 95 + testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 96 + testRunner.And("I have an endpoint /workflows/52b87b54-a728-4796-9a79-d30867da2a6e", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 97 + testRunner.When("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 98 + testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 99 + testRunner.And("I will recieve the error message Failed to validate id, workflow not found", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to GET by ID")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteAWorkflowAndRecieve404WhenTryingToGETByID() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to GET by ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 102 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 103 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 104 + testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 105 + testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 106 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 107 + testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 108 + testRunner.And("I will recieve the error message Failed to validate id, workflow not found", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to UPDATE by ID")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteAWorkflowAndRecieve404WhenTryingToUPDATEByID() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to UPDATE by ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 111 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 112 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 113 + testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 114 + testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 115 + testRunner.And("I have a body Basic_Workflow_Update_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 116 + testRunner.When("I send a PUT request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 117 + testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 118 + testRunner.And("I will recieve the error message Failed to find workflow with Id: c86a437d-d026-4" + + "bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete a workflow and recieve 404 when trying to GET all")] + [NUnit.Framework.CategoryAttribute("DeleteWorkflows")] + public virtual void DeleteAWorkflowAndRecieve404WhenTryingToGETAll() + { + string[] tagsOfScenario = new string[] { + "DeleteWorkflows"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete a workflow and recieve 404 when trying to GET all", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 121 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 122 + testRunner.Given("I have a clinical workflow Basic_Workflow_1_static", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 123 + testRunner.And("I have an endpoint /workflows/c86a437d-d026-4bdf-b1df-c7a6372b89e3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 124 + testRunner.And("I send a DELETE request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 125 + testRunner.And("I have an endpoint /workflows", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 126 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 127 + testRunner.Then("the deleted workflow is not returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowInstancesApi.feature.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowInstancesApi.feature.cs index 607153eaf..de05ee166 100644 --- a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowInstancesApi.feature.cs +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowInstancesApi.feature.cs @@ -1,366 +1,366 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("WorkflowInstancesApi")] - public partial class WorkflowInstancesApiFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "WorkflowInstancesApi.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowInstancesApi", "API to interact with WorkflowInstances collection", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances - multiple")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstances_Multiple() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - multiple", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 6 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 7 - testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 8 - testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("I have a Workflow Instance Existing_WFI_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("I have a Workflow Instance WFI_Multi_Task_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 11 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 12 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 13 - testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances - single")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstances_Single() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - single", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 16 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 17 - testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 18 - testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 19 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 20 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 21 - testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances - empty")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstances_Empty() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - empty", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 24 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 25 - testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 26 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 27 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 28 - testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstancesById() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 31 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 32 - testRunner.Given("I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9569", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 33 - testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 34 - testRunner.And("I have a Workflow Instance WFI_Static_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 35 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 36 - testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 37 - testRunner.And("I can see expected workflow instance is returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id. Id Not Found")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstancesById_IdNotFound() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id. Id Not Found", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 40 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 41 - testRunner.Given("I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9575", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 42 - testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 43 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 44 - testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id. Id Bad Request")] - [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] - public virtual void GetAllWorkflowsInstancesById_IdBadRequest() - { - string[] tagsOfScenario = new string[] { - "GetWorkflowInstances"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id. Id Bad Request", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 47 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 48 - testRunner.Given("I have an endpoint /workflowinstances/absfsushs", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 49 - testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 50 - testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 51 - testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("WorkflowInstancesApi")] + public partial class WorkflowInstancesApiFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private string[] _featureTags = ((string[])(null)); + +#line 1 "WorkflowInstancesApi.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowInstancesApi", "API to interact with WorkflowInstances collection", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public virtual void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public virtual void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances - multiple")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstances_Multiple() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - multiple", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 6 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 7 + testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 8 + testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 + testRunner.And("I have a Workflow Instance Existing_WFI_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 10 + testRunner.And("I have a Workflow Instance WFI_Multi_Task_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 11 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 12 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 13 + testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances - single")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstances_Single() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - single", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 16 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 17 + testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 18 + testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 19 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 20 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 21 + testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances - empty")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstances_Empty() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances - empty", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 24 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 25 + testRunner.Given("I have an endpoint /workflowinstances", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 26 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 27 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 28 + testRunner.And("I can see expected workflow instances are returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstancesById() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 31 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 32 + testRunner.Given("I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9569", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 33 + testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 34 + testRunner.And("I have a Workflow Instance WFI_Static_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 35 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 36 + testRunner.Then("I will get a 200 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 37 + testRunner.And("I can see expected workflow instance is returned", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id. Id Not Found")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstancesById_IdNotFound() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id. Id Not Found", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 40 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 41 + testRunner.Given("I have an endpoint /workflowinstances/bff4cfd0-3af3-4e2b-9f3c-de2a6f2b9575", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 42 + testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 43 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 44 + testRunner.Then("I will get a 404 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Get all workflows instances by Id. Id Bad Request")] + [NUnit.Framework.CategoryAttribute("GetWorkflowInstances")] + public virtual void GetAllWorkflowsInstancesById_IdBadRequest() + { + string[] tagsOfScenario = new string[] { + "GetWorkflowInstances"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get all workflows instances by Id. Id Bad Request", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 47 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 48 + testRunner.Given("I have an endpoint /workflowinstances/absfsushs", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 49 + testRunner.And("I have a Workflow Instance WFI_Static_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 50 + testRunner.When("I send a GET request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 51 + testRunner.Then("I will get a 400 response", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowRequest.feature.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowRequest.feature.cs index ddca41f93..c9096d53d 100644 --- a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowRequest.feature.cs +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Features/WorkflowRequest.feature.cs @@ -1,463 +1,463 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("WorkflowRequest")] - public partial class WorkflowRequestFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "WorkflowRequest.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowRequest", "Publishing a workflow request is consumed by the Workflow Manager.", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request which creates a single workflow instance")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_AeTitle_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_Id_WF_Request", null)] - public virtual void PublishAValidWorkflowRequestWhichCreatesASingleWorkflowInstance(string workflow, string workflowRequestMessage, string[] exampleTags) - { - string[] @__tags = new string[] { - "WorkflowRequest"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("workflow", workflow); - argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request which creates a single workflow instance", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 6 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 7 - testRunner.Given(string.Format("I have a clinical workflow {0}", workflow), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 8 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 10 - testRunner.Then("I can see 1 Workflow Instance is created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 11 - testRunner.And("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request which creates multiple workflow instances")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - [NUnit.Framework.TestCaseAttribute("Same_AeTitle_1", "Same_AeTitle_2", "Same_AeTitle", null)] - [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_Workflow_2", "Basic_Multi_Id_WF_Request", null)] - public virtual void PublishAValidWorkflowRequestWhichCreatesMultipleWorkflowInstances(string workflow_1, string workflow_2, string workflowRequestMessage, string[] exampleTags) - { - string[] @__tags = new string[] { - "WorkflowRequest"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("workflow_1", workflow_1); - argumentsOfScenario.Add("workflow_2", workflow_2); - argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request which creates multiple workflow instances", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 18 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 19 - testRunner.Given(string.Format("I have a clinical workflow {0}", workflow_1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 20 - testRunner.And(string.Format("I have a clinical workflow {0}", workflow_2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 21 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 22 - testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 23 - testRunner.Then("I can see 2 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 24 - testRunner.And("2 Task Dispatch events are published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with mismatched AE title and workflow ID")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - public virtual void PublishAValidWorkflowRequestWithMismatchedAETitleAndWorkflowID() - { - string[] tagsOfScenario = new string[] { - "WorkflowRequest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with mismatched AE title and workflow ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 31 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 32 - testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 33 - testRunner.And("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 34 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 35 - testRunner.When("I publish a Workflow Request Message Mismatch_Id_AeTitle_WF_Request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 36 - testRunner.Then("I can see 1 Workflow Instance is created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request triggering a workflow with multiple revisions")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - [NUnit.Framework.TestCaseAttribute("AeTitle_Multi_Revision_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("WorkflowID_Multi_Revision_WF_Request", null)] - public virtual void PublishAValidWorkflowRequestTriggeringAWorkflowWithMultipleRevisions(string workflowRequestMessage, string[] exampleTags) - { - string[] @__tags = new string[] { - "WorkflowRequest"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request triggering a workflow with multiple revisions", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 39 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 40 - testRunner.Given("I have a clinical workflow Basic_Workflow_Multiple_Revisions_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 41 - testRunner.And("I have a clinical workflow Basic_Workflow_Multiple_Revisions_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 42 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 43 - testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 44 - testRunner.Then("I can see 1 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish an invalid workflow request which does not create a workflow instance")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - [NUnit.Framework.TestCaseAttribute("Missing_PayloadID_Invalid_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Missing_WorkflowID_Invalid_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Missing_Bucket_Invalid_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Missing_CorrelationID_Invalid_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Missing_CallingAETitle_Invalid_WF_Request", null)] - [NUnit.Framework.TestCaseAttribute("Missing_CalledAETitle_Invalid_WF_Request", null)] - public virtual void PublishAnInvalidWorkflowRequestWhichDoesNotCreateAWorkflowInstance(string workflowRequestMessage, string[] exampleTags) - { - string[] @__tags = new string[] { - "WorkflowRequest"}; - if ((exampleTags != null)) - { - @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); - } - string[] tagsOfScenario = @__tags; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an invalid workflow request which does not create a workflow instance", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 51 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 52 - testRunner.Given("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 53 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 54 - testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 55 - testRunner.Then("I can see 0 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + - "ich is not dispatched")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - public virtual void PublishAValidWorkflowRequestWithAnExitingWorkflowInstanceWithATaskWhichIsNotDispatched() - { - string[] tagsOfScenario = new string[] { - "WorkflowRequest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + - "ich is not dispatched", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 66 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 67 - testRunner.Given("I have a clinical workflow Multi_Request_Workflow_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 68 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 69 - testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 70 - testRunner.When("I publish a Workflow Request Message Multi_WF_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 71 - testRunner.Then("I can see an additional Workflow Instance is not created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 72 - testRunner.And("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + - "ich is dispatched")] - [NUnit.Framework.CategoryAttribute("WorkflowRequest")] - public virtual void PublishAValidWorkflowRequestWithAnExitingWorkflowInstanceWithATaskWhichIsDispatched() - { - string[] tagsOfScenario = new string[] { - "WorkflowRequest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + - "ich is dispatched", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 75 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 76 - testRunner.Given("I have a clinical workflow Multi_Request_Workflow_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 77 - testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 78 - testRunner.And("I have a Workflow Instance Existing_WFI_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 79 - testRunner.When("I publish a Workflow Request Message Multi_WF_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 80 - testRunner.Then("I can see an additional Workflow Instance is not created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 81 - testRunner.And("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Features +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("WorkflowRequest")] + public partial class WorkflowRequestFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private string[] _featureTags = ((string[])(null)); + +#line 1 "WorkflowRequest.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WorkflowRequest", "Publishing a workflow request is consumed by the Workflow Manager.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public virtual void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public virtual void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request which creates a single workflow instance")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_AeTitle_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_Id_WF_Request", null)] + public virtual void PublishAValidWorkflowRequestWhichCreatesASingleWorkflowInstance(string workflow, string workflowRequestMessage, string[] exampleTags) + { + string[] @__tags = new string[] { + "WorkflowRequest"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("workflow", workflow); + argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request which creates a single workflow instance", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 6 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 7 + testRunner.Given(string.Format("I have a clinical workflow {0}", workflow), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 8 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 + testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 10 + testRunner.Then("I can see 1 Workflow Instance is created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 11 + testRunner.And("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request which creates multiple workflow instances")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + [NUnit.Framework.TestCaseAttribute("Same_AeTitle_1", "Same_AeTitle_2", "Same_AeTitle", null)] + [NUnit.Framework.TestCaseAttribute("Basic_Workflow_1", "Basic_Workflow_2", "Basic_Multi_Id_WF_Request", null)] + public virtual void PublishAValidWorkflowRequestWhichCreatesMultipleWorkflowInstances(string workflow_1, string workflow_2, string workflowRequestMessage, string[] exampleTags) + { + string[] @__tags = new string[] { + "WorkflowRequest"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("workflow_1", workflow_1); + argumentsOfScenario.Add("workflow_2", workflow_2); + argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request which creates multiple workflow instances", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 18 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 19 + testRunner.Given(string.Format("I have a clinical workflow {0}", workflow_1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 20 + testRunner.And(string.Format("I have a clinical workflow {0}", workflow_2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 21 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 22 + testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 23 + testRunner.Then("I can see 2 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 24 + testRunner.And("2 Task Dispatch events are published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with mismatched AE title and workflow ID")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + public virtual void PublishAValidWorkflowRequestWithMismatchedAETitleAndWorkflowID() + { + string[] tagsOfScenario = new string[] { + "WorkflowRequest"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with mismatched AE title and workflow ID", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 31 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 32 + testRunner.Given("I have a clinical workflow Basic_Workflow_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 33 + testRunner.And("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 34 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 35 + testRunner.When("I publish a Workflow Request Message Mismatch_Id_AeTitle_WF_Request", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 36 + testRunner.Then("I can see 1 Workflow Instance is created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request triggering a workflow with multiple revisions")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + [NUnit.Framework.TestCaseAttribute("AeTitle_Multi_Revision_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("WorkflowID_Multi_Revision_WF_Request", null)] + public virtual void PublishAValidWorkflowRequestTriggeringAWorkflowWithMultipleRevisions(string workflowRequestMessage, string[] exampleTags) + { + string[] @__tags = new string[] { + "WorkflowRequest"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request triggering a workflow with multiple revisions", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 39 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 40 + testRunner.Given("I have a clinical workflow Basic_Workflow_Multiple_Revisions_1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 41 + testRunner.And("I have a clinical workflow Basic_Workflow_Multiple_Revisions_2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 42 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 43 + testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 44 + testRunner.Then("I can see 1 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish an invalid workflow request which does not create a workflow instance")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + [NUnit.Framework.TestCaseAttribute("Missing_PayloadID_Invalid_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Missing_WorkflowID_Invalid_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Missing_Bucket_Invalid_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Missing_CorrelationID_Invalid_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Missing_CallingAETitle_Invalid_WF_Request", null)] + [NUnit.Framework.TestCaseAttribute("Missing_CalledAETitle_Invalid_WF_Request", null)] + public virtual void PublishAnInvalidWorkflowRequestWhichDoesNotCreateAWorkflowInstance(string workflowRequestMessage, string[] exampleTags) + { + string[] @__tags = new string[] { + "WorkflowRequest"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + string[] tagsOfScenario = @__tags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("workflowRequestMessage", workflowRequestMessage); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish an invalid workflow request which does not create a workflow instance", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 51 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 52 + testRunner.Given("I have a clinical workflow Basic_Workflow_3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 53 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 54 + testRunner.When(string.Format("I publish a Workflow Request Message {0}", workflowRequestMessage), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 55 + testRunner.Then("I can see 0 Workflow Instances are created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + + "ich is not dispatched")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + public virtual void PublishAValidWorkflowRequestWithAnExitingWorkflowInstanceWithATaskWhichIsNotDispatched() + { + string[] tagsOfScenario = new string[] { + "WorkflowRequest"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + + "ich is not dispatched", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 66 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 67 + testRunner.Given("I have a clinical workflow Multi_Request_Workflow_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 68 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 69 + testRunner.And("I have a Workflow Instance Existing_WFI_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 70 + testRunner.When("I publish a Workflow Request Message Multi_WF_Created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 71 + testRunner.Then("I can see an additional Workflow Instance is not created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 72 + testRunner.And("1 Task Dispatch event is published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + + "ich is dispatched")] + [NUnit.Framework.CategoryAttribute("WorkflowRequest")] + public virtual void PublishAValidWorkflowRequestWithAnExitingWorkflowInstanceWithATaskWhichIsDispatched() + { + string[] tagsOfScenario = new string[] { + "WorkflowRequest"}; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Publish a valid workflow request with an exiting Workflow Instance with a Task wh" + + "ich is dispatched", null, tagsOfScenario, argumentsOfScenario, this._featureTags); +#line 75 +this.ScenarioInitialize(scenarioInfo); +#line hidden + bool isScenarioIgnored = default(bool); + bool isFeatureIgnored = default(bool); + if ((tagsOfScenario != null)) + { + isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((this._featureTags != null)) + { + isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); + } + if ((isScenarioIgnored || isFeatureIgnored)) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 76 + testRunner.Given("I have a clinical workflow Multi_Request_Workflow_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 77 + testRunner.And("I have a bucket in MinIO bucket1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 78 + testRunner.And("I have a Workflow Instance Existing_WFI_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 79 + testRunner.When("I publish a Workflow Request Message Multi_WF_Dispatched", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 80 + testRunner.Then("I can see an additional Workflow Instance is not created", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 81 + testRunner.And("A Task Dispatch event is not published", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/tests/IntegrationTests/WorkflowManager.IntegrationTests/Support/WebAppFactory.cs b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Support/WebAppFactory.cs new file mode 100644 index 000000000..4f79f42a2 --- /dev/null +++ b/tests/IntegrationTests/WorkflowManager.IntegrationTests/Support/WebAppFactory.cs @@ -0,0 +1,42 @@ +// SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium +// SPDX-License-Identifier: Apache License 2.0 + +using System.Net.Http.Headers; +using System.Text; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Monai.Deploy.WorkflowManager.IntegrationTests.POCO; + +namespace Monai.Deploy.WorkflowManager.IntegrationTests.Support +{ + + public class CustomWebApplicationFactory : WebApplicationFactory where TStartup : class + { + protected override IHostBuilder CreateHostBuilder() => + base.CreateHostBuilder() + .ConfigureHostConfiguration( + config => config.AddCommandLine(new[] { "--test=yes" })); + } + + public static class WebAppFactory + { + public static HttpClient SetupWorkflowManger() + { + var webApplicationFactory = new CustomWebApplicationFactory(); + + return webApplicationFactory.CreateClient(); + } + + public static async Task GetConsumers() + { + var httpClient = new HttpClient(); + + var svcCredentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(TestExecutionConfig.RabbitConfig.User + ":" + TestExecutionConfig.RabbitConfig.Password)); + + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", svcCredentials); + + return await httpClient.GetAsync($"http://{TestExecutionConfig.RabbitConfig.Host}:{TestExecutionConfig.RabbitConfig.Port}/api/consumers"); + } + } +} diff --git a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json index 40b10f51d..8375b57cc 100644 --- a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json +++ b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json @@ -98,6 +98,15 @@ "System.ComponentModel.Annotations": "4.3.0" } }, + "AutoMapper": { + "type": "Transitive", + "resolved": "10.1.1", + "contentHash": "uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + } + }, "AWSSDK.Core": { "type": "Transitive", "resolved": "3.7.12.2", @@ -152,6 +161,28 @@ "NETStandard.Library": "1.6.1" } }, + "Fractions": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "1uv2IqQ6AsLtrcsibOTEyyHLQpxgjONssPrI0Ug84AIuSVqVDcotaNkTaJTprFvxbCNi7Kp/3WAAtnytuQP3qQ==", + "dependencies": { + "System.Runtime.Numerics": "4.3.0" + } + }, + "IdentityModel": { + "type": "Transitive", + "resolved": "5.2.0", + "contentHash": "nuhkbaDH9l5QzNJp2MtP3qio57MPtiRneUN8Ocr7od0JvSYaIe3gBj/vxllr11S/Qvu1AG4GZXoyv5469ewYDA==" + }, + "IdentityModel.OidcClient": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "4KTG0+M3UBxr0UraGo8MfqEGT9MeMDtaBvPyZccmwW+JH+UG3psW5IVITKgobpgWmK+OKoE2FQQ4XBlaLfyCyw==", + "dependencies": { + "IdentityModel": "5.2.0", + "Microsoft.Extensions.Logging": "6.0.0" + } + }, "JetBrains.Annotations": { "type": "Transitive", "resolved": "2021.3.0", @@ -168,6 +199,38 @@ "System.Threading.Channels": "4.7.1" } }, + "KubernetesClient": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "wycP/ApzjNToo6N0is0cDVK6m282MOXSlJDaZPmMibpdgZf2MKjS289MRUIXz3+Syftu4zsqlinDMGbmi5Xjog==", + "dependencies": { + "IdentityModel.OidcClient": "4.0.0", + "KubernetesClient.Basic": "7.2.19", + "KubernetesClient.Models": "7.2.19", + "System.IO.Abstractions": "13.2.47", + "System.IdentityModel.Tokens.Jwt": "6.13.1", + "prometheus-net": "5.0.1" + } + }, + "KubernetesClient.Basic": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "1LboFwnEg9gxB8gF9BqaS8gnNVetqRGS9XWyVMlzAxpeYaTF5mNCoj4OCZyLj8Ogo0kdrASjG9qOjozpQDWZlg==", + "dependencies": { + "KubernetesClient.Models": "7.2.19" + } + }, + "KubernetesClient.Models": { + "type": "Transitive", + "resolved": "7.2.19", + "contentHash": "ekEK90+eJTKN1KzW7kFcJofSjv3X+Q4MhLxAZdgn7pTCJg0qk4/FhV8sYJ/ZMw20Ue5Rob3vAw9WROHZaLNIdQ==", + "dependencies": { + "AutoMapper": "10.1.1", + "Fractions": "7.0.0", + "System.Text.Json": "6.0.2", + "YamlDotNet": "11.2.1" + } + }, "Microsoft.AspNetCore.JsonPatch": { "type": "Transitive", "resolved": "6.0.3", @@ -432,6 +495,16 @@ "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0" } }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "3.1.9", + "contentHash": "sRyrkBJGS+8ucKak+RmAPkAiIm6amA5ztpIkp0zrPn5+kDX2j8XJdRARr4Eh003RIGQxzvNGQ+j/voAhlPoXyw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.9", + "Microsoft.Extensions.Logging": "3.1.9", + "Microsoft.Extensions.Options": "3.1.9" + } + }, "Microsoft.Extensions.Logging": { "type": "Transitive", "resolved": "6.0.0", @@ -537,6 +610,29 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "Microsoft.IdentityModel.JsonWebTokens": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "seLGCIo8bDz93PGgKY9vV4PAHpu1iXwH4Xm6O+HOJbIcnpiJz4f4C/MVFKfOb+yKGMtix2qyFkQMKOdVmArn0Q==", + "dependencies": { + "Microsoft.IdentityModel.Tokens": "6.13.1" + } + }, + "Microsoft.IdentityModel.Logging": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "pUr0kicIy3cNgrapB7old+N+OithDcowO/uqOg/z9dMC8u25/1YS7QirJWKi/0z31fBOE/uEFBHfSfnRCKRxsA==" + }, + "Microsoft.IdentityModel.Tokens": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "tUTbP9/wMuOGDiTBPXEN24M9rVAEJ8EOvk4pwoo5UKRNUK3bAZYqkzFpcgNOAY3PHHjwZJ2stk4Gf5jvspz0yg==", + "dependencies": { + "Microsoft.CSharp": "4.5.0", + "Microsoft.IdentityModel.Logging": "6.13.1", + "System.Security.Cryptography.Cng": "4.5.0" + } + }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "5.0.0", @@ -704,6 +800,14 @@ "resolved": "5.11.0", "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" }, + "prometheus-net": { + "type": "Transitive", + "resolved": "5.0.1", + "contentHash": "tg+vGeKCUqaWPzHAuKI87/rqQD4RKjb/jlRqSPaAdGRFd/SFDFRHPE8Rcy5Rx2f4xqdR+s3qTQ/0Y/IHbI3D1Q==", + "dependencies": { + "Microsoft.Extensions.Http": "3.1.9" + } + }, "RabbitMQ.Client": { "type": "Transitive", "resolved": "6.4.0", @@ -1072,6 +1176,15 @@ "System.Runtime.InteropServices": "4.3.0" } }, + "System.IdentityModel.Tokens.Jwt": { + "type": "Transitive", + "resolved": "6.13.1", + "contentHash": "BTVPnmvqpKxv+ucl3Ii7HnRVvXvfm/P5iq3rnTnJ0YuneZUS7zGtE+DRrVQWSd431ntjZuHBGPbjaB+nCSq9Uw==", + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "6.13.1", + "Microsoft.IdentityModel.Tokens": "6.13.1" + } + }, "System.IO": { "type": "Transitive", "resolved": "4.3.0", @@ -1242,15 +1355,8 @@ }, "System.Reflection.Emit": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } + "resolved": "4.7.0", + "contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==" }, "System.Reflection.Emit.ILGeneration": { "type": "Transitive", @@ -1410,21 +1516,8 @@ }, "System.Security.Cryptography.Cng": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } + "resolved": "4.5.0", + "contentHash": "WG3r7EyjUe9CMPFSs6bty5doUqT+q9pbI80hlNzo2SkPkZ4VTuZkGWjpp77JB8+uaL4DFPRdBsAY+DX3dBK92A==" }, "System.Security.Cryptography.Csp": { "type": "Transitive", @@ -1572,8 +1665,8 @@ }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "resolved": "6.0.2", + "contentHash": "0nE2gwXLn3PTBOPwORLqwuYvWB+Beomt9ZBX+6LmogMNKUvfD1SoDb/ycB1vBntT94rGaB/SvxEyeLu14H6aEg==", "dependencies": { "System.Runtime.CompilerServices.Unsafe": "6.0.0", "System.Text.Encodings.Web": "6.0.0" @@ -1705,6 +1798,11 @@ "xunit.extensibility.core": "[2.4.1]" } }, + "YamlDotNet": { + "type": "Transitive", + "resolved": "11.2.1", + "contentHash": "tBt8K+korVfrjH9wyDEhiLKxbs8qoLCLIFwvYgkSUuMC9//w3z0cFQ8LQAI/5MCKq+BMil0cfRTRvPeE7eXhQw==" + }, "monai.deploy.workflowmanager": { "type": "Project", "dependencies": { @@ -1726,6 +1824,8 @@ "Monai.Deploy.WorkflowManager.Database": "1.0.0", "Monai.Deploy.WorkflowManager.Logging": "1.0.0", "Monai.Deploy.WorkflowManager.PayloadListener": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager.Argo": "1.0.0", "Newtonsoft.Json": "13.0.1", "Swashbuckle.AspNetCore": "6.3.0" } @@ -1812,6 +1912,42 @@ "Monai.Deploy.WorkflowManager.Logging": "1.0.0" } }, + "monai.deploy.workflowmanager.taskmanager": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Hosting": "6.0.1", + "Microsoft.Extensions.Hosting.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.1", + "Microsoft.Extensions.Options": "6.0.0", + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060", + "Monai.Deploy.WorkflowManager.Common": "1.0.0", + "Monai.Deploy.WorkflowManager.Configuration": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager.API": "1.0.0" + } + }, + "monai.deploy.workflowmanager.taskmanager.api": { + "type": "Project", + "dependencies": { + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060" + } + }, + "monai.deploy.workflowmanager.taskmanager.argo": { + "type": "Project", + "dependencies": { + "IdentityModel.OidcClient": "5.0.0", + "KubernetesClient": "7.2.19", + "Monai.Deploy.Messaging": "0.1.0-rc0047", + "Monai.Deploy.Storage": "0.1.0-rc0060", + "Monai.Deploy.Storage.MinIO": "0.1.0-rc0060", + "Monai.Deploy.WorkflowManager.Common": "1.0.0", + "Monai.Deploy.WorkflowManager.TaskManager.API": "1.0.0", + "Newtonsoft.Json": "13.0.1" + } + }, "monai.deploy.workloadmanager.workfowexecuter": { "type": "Project", "dependencies": {