Skip to content

RunWith(Enclosed.class) should run tests in outer class #656

Closed as not planned
@christophsturm

Description

@christophsturm

in this example:

@RunWith(Enclosed.class)
public class OuterClassTest  {
    @Before
    public void startStore() throws Exception {
...
    }

    @Test
    public void outerTest1() {
...
    }

    public static class PoolTest extends JedisPoolTestBase {
        private StatisticsStore storer;

        @Before
        public void setupStorer() {
        }


         @Test
         public void innerTest1() {
          ...  
         }
    }
}

only innerTest1 runs.
It would be more useful if outerTest1 was also run.
also @before classes in the outer class should run for tests in the inner class.
thats how nested tests work in other languages.
is this easily possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions