Java 类org.joda.time.tz.ZoneInfoProvider 实例源码

项目:astor    文件:TestDateTimeZone.java   
public void testProvider_badClassName() {
    try {
        System.setProperty("org.joda.time.DateTimeZone.Provider", "xxx");
        DateTimeZone.setProvider(null);

    } catch (RuntimeException ex) {
        // expected
        assertEquals(ZoneInfoProvider.class, DateTimeZone.getProvider().getClass());
    } finally {
        System.getProperties().remove("org.joda.time.DateTimeZone.Provider");
        DateTimeZone.setProvider(null);
    }
}