Created
February 8, 2015 16:39
-
-
Save michaelrice/ef04a3a331c7aa572058 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void test_GetAllFields_Returns_All_Fields_With_AbstractClass() throws Exception { | |
| abstract class MySuperClass { | |
| public String baz; | |
| public void myBaz() {} | |
| } | |
| class MyClass extends MySuperClass { | |
| public String foo; | |
| public int[] bar; | |
| public void myFoo() {} | |
| private int myBar; | |
| } | |
| Field[] fields = ReflectUtil.getAllFields(MyClass.class); | |
| assertEquals(fields.length, 6); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment