You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using suppressConstructorHeirachy you should be able to do:
@PrepareForTest( SuppressConstructorHierarchyChild.class ) @RunWith(PowerMockRunner.class)
public class SuppressConstructorHierarchyDemoTest { @test
public void testSuppressConstructor() throws Exception {
instead of
@PrepareForTest( { SuppressConstructorHierarchyChild.class,
SuppressConstructorHierarchyParent.class,
SuppressConstructorHeirarchyEvilGrandParent.class }) @RunWith(PowerMockRunner.class)
public class SuppressConstructorHierarchyDemoTest {
..
}
From johan.ha...@gmail.com on October 12, 2008 21:38:41
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: http://code.google.com/p/powermock/issues/detail?id=24
The text was updated successfully, but these errors were encountered: