Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setup] error when doing inheritance #272

Closed
jbayardo opened this issue Sep 30, 2016 · 2 comments
Closed

[Setup] error when doing inheritance #272

jbayardo opened this issue Sep 30, 2016 · 2 comments

Comments

@jbayardo
Copy link

If you have something like:

class A {
    [Setup]
    public virtual void Setup() {
        DoStuff();
    }
}

class B : A {
    [Setup]
    public override void Setup() {
        base.Setup();
        DoSomeMoreStuff();
    }
}

This triggers an error saying that you have more than one Setup. This is strictly untrue, as there is a single one (Setup). Removing the [Setup] marker means that no method is called afterwards (not even the inherited one). If you do set it with [Setup], however, everything seems to run fine anyways. This only happens when using ExecutionValidator.FailOnError.

@AndreyAkinshin AndreyAkinshin added this to the v0.10.x milestone Sep 30, 2016
@AndreyAkinshin
Copy link
Member

@adamsitnik, could you take a look?

@adamsitnik adamsitnik modified the milestones: v0.10.0, v0.10.x Oct 1, 2016
@adamsitnik adamsitnik self-assigned this Oct 1, 2016
@adamsitnik
Copy link
Member

@jbayardo Thanks for detailed bug report! Fixed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants