Skip to content
This repository has been archived by the owner on Dec 12, 2017. It is now read-only.

Inherited Facts from public classes are not displayed properly #79

Closed
mcliment opened this issue Sep 11, 2015 · 0 comments
Closed

Inherited Facts from public classes are not displayed properly #79

mcliment opened this issue Sep 11, 2015 · 0 comments

Comments

@mcliment
Copy link

Given this test case:

public class Calculator
{
    public virtual int Add(int x, int y)
    {
        return x + y;
    }
}

public class Calculator2 : Calculator
{
    public override int Add(int x, int y)
    {
        return x + y + 1;
    }
}

public class BaseFacts
{
    protected Calculator calc;

    public BaseFacts()
    {
        calc = new Calculator();
    }

    [Fact]
    public void Adds2()
    {
        var result = calc.Add(2, 2);

        Assert.Equal(result, 4);
    }
}

public class Facts : BaseFacts
{
    public Facts()
    {
        calc = new Calculator2();
    }

    [Fact]
    public void Adds3()
    {
        var result = calc.Add(3, 3);

        Assert.Equal(result, 7);
    }
}

Resharper test runner only shows two tests and actually there are three, as show in Visual Studio test explorer.
As a detail, Resharper briefly shows the inherited test at the beginning but it disappears and the test is in fact executed.

resharper

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

No branches or pull requests

1 participant