Skip to content

Commit

Permalink
ShouldMapStepDetails fix
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Nestorow <[email protected]>
  • Loading branch information
PiotrNestor committed Aug 16, 2024
1 parent 3624899 commit 9da0bd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/ExecutionInfoMapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Gauge.Dotnet.Wrappers;
using Gauge.CSharp.Lib;
using System.Linq;
using System.Collections.Generic;

namespace Gauge.Dotnet.UnitTests
{
Expand All @@ -23,7 +24,7 @@ public void Setup()
Retries = new ScenarioRetriesInfo{MaxRetries = 0, CurrentRetry = 0} },
CurrentSpec = new SpecInfo {FileName = "dummy.spec", Name = "Dummy Spec", IsFailed = true},
CurrentStep = new StepInfo {IsFailed = true, ErrorMessage = "Dummy Error", StackTrace = "Dummy Stacktrace",
Step = new ExecuteStepRequest {ActualStepText = "Dummy Step Text"}
Step = new ExecuteStepRequest {ActualStepText = "Dummy Step Text"},
}
};
}
Expand Down Expand Up @@ -77,7 +78,7 @@ public void ShouldMapStepDetails()
var mockActivatorWrapper = new Mock<IActivatorWrapper>();
mockActivatorWrapper.Setup(x => x.CreateInstance(typeof(ExecutionContext.StepDetails),
executionInfo.CurrentStep.Step.ActualStepText, executionInfo.CurrentStep.IsFailed,
executionInfo.CurrentStep.StackTrace, executionInfo.CurrentStep.ErrorMessage)).Verifiable();
executionInfo.CurrentStep.StackTrace, executionInfo.CurrentStep.ErrorMessage, new List<List<string>>())).Verifiable();
new ExecutionInfoMapper(mockAssemblyLoader.Object, mockActivatorWrapper.Object).ExecutionContextFrom(executionInfo);
mockActivatorWrapper.VerifyAll();
}
Expand Down

0 comments on commit 9da0bd1

Please sign in to comment.