Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
johanhaleby opened this issue Jul 23, 2015 · 2 comments

Comments

@johanhaleby
Copy link
Collaborator

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

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on October 12, 2008 12:39:12

Summary: You shouldn't need to add all classes in a heirarchy when suppression constructors

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on October 13, 2008 09:39:25

Already works

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant