gordonad / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

You shouldn't need to add all classes in a heirarchy when suppression constructors #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using suppressConstructorHeirachy you should be able to do:

@PrepareForTest( SuppressConstructorHierarchyChild.class )
@RunWith(PowerMockRunner.class)
public class SuppressConstructorHierarchyDemoTest {
    @Test
    public void testSuppressConstructor() throws Exception {

suppressConstructorCodeHierarchy(SuppressConstructorHierarchyChild.class);
}
..
}

instead of 
@PrepareForTest( { SuppressConstructorHierarchyChild.class,
SuppressConstructorHierarchyParent.class,
        SuppressConstructorHeirarchyEvilGrandParent.class })
@RunWith(PowerMockRunner.class)
public class SuppressConstructorHierarchyDemoTest {
..
}

Original issue reported on code.google.com by johan.ha...@gmail.com on 12 Oct 2008 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 12 Oct 2008 at 7:39

GoogleCodeExporter commented 9 years ago
Already works

Original comment by johan.ha...@gmail.com on 13 Oct 2008 at 4:39