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
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 12 Oct 2008 at 7:38