From 272d6f03a7448a1f8754d1adab0fb6e98fe579f0 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 7 Dec 2022 21:05:24 +0100 Subject: [PATCH] Fix tests --- .../Modules/Runtime/WorkflowStateStore.cs | 1 - .../Elsa.Workflows.Core/Activities/Event.cs | 2 +- .../Activities/Flowchart/Models/FlowScope.cs | 2 +- .../Activities/WriteLine.cs | 4 +-- .../Activities/If/ComplexIfWorkflow.cs | 26 ++++++++++++------- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/modules/Elsa.Persistence.EntityFrameworkCore/Modules/Runtime/WorkflowStateStore.cs b/src/modules/Elsa.Persistence.EntityFrameworkCore/Modules/Runtime/WorkflowStateStore.cs index d852fe4a7..6ab2c100f 100644 --- a/src/modules/Elsa.Persistence.EntityFrameworkCore/Modules/Runtime/WorkflowStateStore.cs +++ b/src/modules/Elsa.Persistence.EntityFrameworkCore/Modules/Runtime/WorkflowStateStore.cs @@ -19,7 +19,6 @@ public class EFCoreWorkflowStateStore : IWorkflowStateStore public EFCoreWorkflowStateStore( IDbContextFactory dbContextFactory, - Store store, SerializerOptionsProvider serializerOptionsProvider, ISystemClock systemClock) { diff --git a/src/modules/Elsa.Workflows.Core/Activities/Event.cs b/src/modules/Elsa.Workflows.Core/Activities/Event.cs index f9dfe1abb..041dde962 100644 --- a/src/modules/Elsa.Workflows.Core/Activities/Event.cs +++ b/src/modules/Elsa.Workflows.Core/Activities/Event.cs @@ -14,7 +14,7 @@ public class Event : Trigger { /// [JsonConstructor] - public Event([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) + internal Event([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) { } diff --git a/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowScope.cs b/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowScope.cs index e958bc7a3..51363debe 100644 --- a/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowScope.cs +++ b/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowScope.cs @@ -3,7 +3,7 @@ using Elsa.Workflows.Core.Services; namespace Elsa.Workflows.Core.Activities.Flowchart.Models; -public class FlowScope +internal class FlowScope { [JsonConstructor] public FlowScope() diff --git a/src/modules/Elsa.Workflows.Core/Activities/WriteLine.cs b/src/modules/Elsa.Workflows.Core/Activities/WriteLine.cs index 19624fe5b..3291c7fec 100644 --- a/src/modules/Elsa.Workflows.Core/Activities/WriteLine.cs +++ b/src/modules/Elsa.Workflows.Core/Activities/WriteLine.cs @@ -15,12 +15,12 @@ namespace Elsa.Workflows.Core.Activities; public class WriteLine : Activity { /// - private WriteLine([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) + internal WriteLine([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line) { } /// - public WriteLine(string text, [CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : this(new Literal(text), source, line) + public WriteLine(string text = default!, [CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : this(new Literal(text), source, line) { } diff --git a/test/Elsa.IntegrationTests/Activities/If/ComplexIfWorkflow.cs b/test/Elsa.IntegrationTests/Activities/If/ComplexIfWorkflow.cs index 91cbe8b8a..2ae238906 100644 --- a/test/Elsa.IntegrationTests/Activities/If/ComplexIfWorkflow.cs +++ b/test/Elsa.IntegrationTests/Activities/If/ComplexIfWorkflow.cs @@ -22,16 +22,22 @@ public class ComplexIfWorkflow : WorkflowBase new WriteLine("Start"), new If(_condition) { - Then = new Sequence( - - new WriteLine("Executing"), - new WriteLine("True!") - ), - Else = new Sequence( - - new WriteLine("Executing"), - new WriteLine("False!") - ) + Then = new Sequence + { + Activities = + { + new WriteLine("Executing"), + new WriteLine("True!") + } + }, + Else = new Sequence + { + Activities = + { + new WriteLine("Executing"), + new WriteLine("False!") + } + } }, new WriteLine("End") }