Skip to content

There is no output for a Context.Given when called from a base class. #6

@KarsonAlford

Description

@KarsonAlford

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);
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions