Skip to content

Remove DisableVerification on RockContext #393

@JasonBock

Description

@JasonBock

Describe the solution you'd like
I think I over-though the DisableVerification parameter to RockContext. If I change Dispose() to this:

public void Dispose()
{
    ObjectDisposedException.ThrowIf(this.isDisposed, this);

    if (!this.createdExpectations.Any(_ => _.WasExceptionThrown))
    {
        foreach (var createdExpectations in this.createdExpectations)
        {
            createdExpectations.Verify();
        }
    }

    this.isDisposed = true;
}

This would require WasExceptionThrown to be public, at least the getter - the setter should stay protected. Probably want to do the same thing for WasInstanceInvoked.

Then the constructor on RockContext can be removed. This will be a breaking change, which is why I'm including it with the 10.0.0 release.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions