Hi,
So I just tried Robolectric 2.0 and I'm seeing an issue.
If I set static fields in a @BeforeClass method, the fields are null by the time my @Before setup() code is run.
private static String JUST_AN_EXAMPLE;
@BeforeClass
public static void enableTestInjection() {
JUST_AN_EXAMPLE = "It works!";
System.out.println("1: " + JUST_AN_EXAMPLE);
}
@Before
public void setup() throws Exception {
System.out.println("2: " + JUST_AN_EXAMPLE);
}
Running the above, I see this in the console.
1: It works!
WARNING: no system properties value for ro.build.date.utc
2: null
Thanks,
DB