This behavior makes sense when the call is made in a static context. However, this is also happening when called from a before.
[TestClass, Ignore] // All unit test base classes should be ignored.
public abstract class expectations_for_XXX : Scenario
{
protected static AssessmentInstance AssessmentInstance;
protected static List<ResultQuestionViewModel> Result { get; set; }
before initialize = () =>
{
Mapper.Reset(); // Clear the static MappingEngine.
Mapper.AddProfile<AssessmentScoreMappingProfile>();
AssessmentInstance = Context.Given<AssessmentInstance>(AssessmentScoreContextProvider.EverythingAssessment);
};
This behavior makes sense when the call is made in a static context. However, this is also happening when called from a before.