Search in sources :

Example 11 with ClassWithPrivateMethods

use of org.powermock.reflect.testclasses.ClassWithPrivateMethods in project powermock by powermock.

the class WhiteBoxTest method testInvokePrivateMethodWithAClassArgument.

@Test
public void testInvokePrivateMethodWithAClassArgument() throws Exception {
    ClassWithPrivateMethods tested = new ClassWithPrivateMethods();
    assertEquals(ClassWithChildThatHasInternalState.class, Whitebox.invokeMethod(tested, "methodWithClassArgument", ClassWithChildThatHasInternalState.class));
}
Also used : ClassWithPrivateMethods(org.powermock.reflect.testclasses.ClassWithPrivateMethods) ClassWithChildThatHasInternalState(org.powermock.reflect.testclasses.ClassWithChildThatHasInternalState) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)11 ClassWithPrivateMethods (org.powermock.reflect.testclasses.ClassWithPrivateMethods)11 ClassWithChildThatHasInternalState (org.powermock.reflect.testclasses.ClassWithChildThatHasInternalState)4 AbstractClass (org.powermock.reflect.testclasses.AbstractClass)1 ClassWithInternalState (org.powermock.reflect.testclasses.ClassWithInternalState)1