-
Notifications
You must be signed in to change notification settings - Fork 19
Accessing static methods
stephanenicolas edited this page Sep 12, 2013
·
1 revision
BoundBox provides access to all static methods defined in a given class and its super class.
Let's say we have a class A like :
@SuppressWarnings("unused")
public class A {
private static String foo() {
return "a";
}
}
With BoundBox, you can write a test that accesses methods of A :
@BoundBox( boundClass = A.class )
public class ATest {
@Test
public void testFoo() {
//GIVEN
//WHEN
//THEN
assertEquals( "a", BoundBoxOfA.foo());
}
}
For all static methods defined in a class A, its BoundBox will contain the same static method with the same list of parameters.