diff --git a/CompuMaster.TaskManagement/ProgressingTaskStepBase.vb b/CompuMaster.TaskManagement/ProgressingTaskStepBase.vb index 89f88af..39e0946 100644 --- a/CompuMaster.TaskManagement/ProgressingTaskStepBase.vb +++ b/CompuMaster.TaskManagement/ProgressingTaskStepBase.vb @@ -43,7 +43,7 @@ Public MustInherit Class ProgressingTaskStepBase ''' ''' - Public Delegate Function StepActionMethodWithFailAction(taskstep As ProgressingTaskStepBase) As ProgressingTaskStepDynamicFailAction + Public Delegate Function StepActionMethodWithFailAction(taskstep As ProgressingTaskStepBase) As TaskStepActionResult Public Property ParentTask As ProgressingTaskItem Public Property StepTitle As String @@ -72,7 +72,7 @@ Public MustInherit Class ProgressingTaskStepBase End Get End Property - Friend Property StepExecutionResult As ProgressingTaskStepDynamicFailAction + Friend Property StepExecutionResult As TaskStepActionResult Public Sub Run() Select Case Me.Status diff --git a/CompuMaster.TaskManagement/ProgressingTaskStepDynamicFailAction.vb b/CompuMaster.TaskManagement/TaskStepActionResult.vb similarity index 82% rename from CompuMaster.TaskManagement/ProgressingTaskStepDynamicFailAction.vb rename to CompuMaster.TaskManagement/TaskStepActionResult.vb index 406ae3d..fb388c7 100644 --- a/CompuMaster.TaskManagement/ProgressingTaskStepDynamicFailAction.vb +++ b/CompuMaster.TaskManagement/TaskStepActionResult.vb @@ -1,4 +1,7 @@ -Public Class ProgressingTaskStepDynamicFailAction +''' +''' The result of a step action method +''' +Public Class TaskStepActionResult Public Sub New() Me.CompletedSuccessful = True diff --git a/CompuMaster.Test.TaskManagement/TaskBundleRunBehaviourTest.vb b/CompuMaster.Test.TaskManagement/TaskBundleRunBehaviourTest.vb index e221dd5..15dd7f0 100644 --- a/CompuMaster.Test.TaskManagement/TaskBundleRunBehaviourTest.vb +++ b/CompuMaster.Test.TaskManagement/TaskBundleRunBehaviourTest.vb @@ -56,7 +56,7 @@ Namespace CompuMaster.Test.TaskManagement Dim TaskBundle As ProgressingTaskBundle TaskBundle = DummyTaskBundlesExtended.DummyTaskBundleFailingStepActionWithFailAction(Function() 'Success => no exception, but dynamic result - Return New ProgressingTaskStepDynamicFailAction() + Return New TaskStepActionResult() End Function) TaskBundle.RunAllTasks() System.Console.WriteLine(TaskBundle.DisplaySummary) @@ -94,7 +94,7 @@ Namespace CompuMaster.Test.TaskManagement Dim TaskBundle As ProgressingTaskBundle TaskBundle = DummyTaskBundlesExtended.DummyTaskBundleFailingStepActionWithFailAction(Function() 'Catched exception failure - LogAndContinue - Return New ProgressingTaskStepDynamicFailAction(New CustomException("Failure-Test in Dummy" & System.Environment.NewLine & "with a 2nd line in exception message"), ProgressingTaskStepBase.ProgressingTaskStepFailAction.LogExceptionAndContinue) + Return New TaskStepActionResult(New CustomException("Failure-Test in Dummy" & System.Environment.NewLine & "with a 2nd line in exception message"), ProgressingTaskStepBase.ProgressingTaskStepFailAction.LogExceptionAndContinue) End Function) Assert.Catch(Of AggregateException)(Sub() TaskBundle.RunAllTasks()) System.Console.WriteLine(TaskBundle.DisplaySummary) @@ -111,7 +111,7 @@ Namespace CompuMaster.Test.TaskManagement Dim TaskBundle As ProgressingTaskBundle TaskBundle = DummyTaskBundlesExtended.DummyTaskBundleFailingStepActionWithFailAction(Function() 'Catched exception failure - Throw - Return New ProgressingTaskStepDynamicFailAction(New CustomException("Failure-Test in Dummy" & System.Environment.NewLine & "with a 2nd line in exception message"), ProgressingTaskStepBase.ProgressingTaskStepFailAction.ThrowException) + Return New TaskStepActionResult(New CustomException("Failure-Test in Dummy" & System.Environment.NewLine & "with a 2nd line in exception message"), ProgressingTaskStepBase.ProgressingTaskStepFailAction.ThrowException) End Function) Assert.Catch(Of AggregateException)(Sub() TaskBundle.RunAllTasks()) System.Console.WriteLine(TaskBundle.DisplaySummary)