machine.specifications icon indicating copy to clipboard operation
machine.specifications copied to clipboard

Inheriting from Generic class's nested class fails

Open WaffleSouffle opened this issue 9 years ago • 1 comments

public class SomeTests { internal class Given_non_generic_top { internal class Given_nested_non_generic : Given_non_generic_top { } }

    internal class Nested_non_generic_test : Given_non_generic_top
        .Given_nested_non_generic
    {
        // Passes
        It Should_be_ok = () => true.ShouldBeTrue();
    }

    internal class Given_generic_top<T>
    {
        internal class Given_nested_generic : Given_generic_top<T>
        { }
    }

    internal class Top_generic_test : Given_generic_top<int>
    {
        // Passes
        It Should_be_ok = () => true.ShouldBeTrue();
    }

    internal class Nested_generic_test : Given_generic_top<int>
        .Given_nested_generic
    {
        // Fails: The parent fixture of this test experienced a failure during test execution
        It Should_be_ok = () => true.ShouldBeTrue();
    }
}

WaffleSouffle avatar Mar 24 '16 16:03 WaffleSouffle