Skip to content

Commit

Permalink
test: Moving monitor test to API and Example Orchestrations (#54)
Browse files Browse the repository at this point in the history
* Rename monotor tests

* Moved api test to api solution

* Move monitor test from client to orchestration

* Renames activities for example processes

* Remove deprecated tests

* Clean up

* Set Termination state dependent of input

* Update ProcessManager.Abstractions.csproj

* TerminatedSted takes state as input
  • Loading branch information
RasmusGraabaek authored Dec 20, 2024
1 parent dbba563 commit fea8bd6
Show file tree
Hide file tree
Showing 26 changed files with 199 additions and 714 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\ProcessManager.Core.Tests\Fixtures\ProcessManagerDatabaseManager.cs" Link="Fixtures\ProcessManagerDatabaseManager.cs" />
<Compile Include="..\ProcessManager.Example.Orchestrations.Tests\Fixtures\ExampleOrchestrationsAppManager.cs">
<Link>Fixtures\ExampleOrchestrationsAppManager.cs</Link>
</Compile>
<Compile Include="..\ProcessManager.Tests\Fixtures\ProcessManagerAppManager.cs">
<Link>Fixtures\ProcessManagerAppManager.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Energinet.DataHub.ProcessManager.Client.Tests.Fixtures.Extensions;
namespace Energinet.DataHub.ProcessManager.Example.Orchestrations.Tests.Fixtures.Extensions;

public static class ServiceCollectionExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,28 @@
using Energinet.DataHub.Core.TestCommon;
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model;
using Energinet.DataHub.ProcessManager.Abstractions.Api.Model.OrchestrationInstance;
using Energinet.DataHub.ProcessManager.Client;
using Energinet.DataHub.ProcessManager.Client.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Client.Extensions.Options;
using Energinet.DataHub.ProcessManager.Client.Tests.Fixtures;
using Energinet.DataHub.ProcessManager.Client.Tests.Fixtures.Extensions;
using Energinet.DataHub.ProcessManager.Example.Orchestrations.Abstractions.Processes.BRS_X01.InputExample.V1;
using Energinet.DataHub.ProcessManager.Example.Orchestrations.Abstractions.Processes.BRS_X01.InputExample.V1.Model;
using Energinet.DataHub.ProcessManager.Example.Orchestrations.Tests.Fixtures;
using Energinet.DataHub.ProcessManager.Example.Orchestrations.Tests.Fixtures.Extensions;
using FluentAssertions;
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;

namespace Energinet.DataHub.ProcessManager.Client.Tests.Integration.BRS_X01.InputExample.V1;
namespace Energinet.DataHub.ProcessManager.Example.Orchestrations.Tests.Integration.Processes.BRS_X01.InputExample.V1;

/// <summary>
/// Test case where we verify the Process Manager clients can be used to start an
/// example orchestration (with input parameter) and monitor its status during its lifetime.
/// </summary>
[Collection(nameof(ProcessManagerClientCollection))]
public class MonitorExampleUsingClientScenario : IAsyncLifetime
[Collection(nameof(ExampleOrchestrationsAppCollection))]
public class MonitorOrchestrationUsingClientScenario : IAsyncLifetime
{
public MonitorExampleUsingClientScenario(
ProcessManagerClientFixture fixture,
public MonitorOrchestrationUsingClientScenario(
ExampleOrchestrationsAppFixture fixture,
ITestOutputHelper testOutputHelper)
{
Fixture = fixture;
Expand All @@ -54,7 +55,7 @@ public MonitorExampleUsingClientScenario(
ServiceProvider = services.BuildServiceProvider();
}

private ProcessManagerClientFixture Fixture { get; }
private ExampleOrchestrationsAppFixture Fixture { get; }

private ServiceProvider ServiceProvider { get; }

Expand Down

This file was deleted.

Loading

0 comments on commit fea8bd6

Please sign in to comment.