1111import net .time4j .tz .ZonalOffset ;
1212import net .time4j .tz .ZonalTransition ;
1313import net .time4j .tz .ZoneModelProvider ;
14- import net .time4j .tz .olson .AMERICA ;
1514import org .junit .After ;
1615import org .junit .Before ;
1716import org .junit .Test ;
3130@ RunWith (JUnit4 .class )
3231public class RepositoryTest {
3332
34- private static final ChronoFormatter < Moment > PARSER =
35- Iso8601Format .EXTENDED_DATE_TIME_OFFSET ;
33+ private static final String STD_VERSION = "2016f" ;
34+ private static final ChronoFormatter < Moment > PARSER = Iso8601Format .EXTENDED_DATE_TIME_OFFSET ;
3635
3736 private String propertyValue = null ;
3837
3938 @ Before
4039 public void setUp () {
4140 String propertyKey = "net.time4j.tz.repository.version" ;
4241 this .propertyValue = System .getProperty (propertyKey );
43- System .setProperty (propertyKey , "2016e" );
42+ System .setProperty (propertyKey , STD_VERSION );
4443 System .setProperty ("test.environment" , "true" );
4544 }
4645
@@ -54,13 +53,6 @@ public void tearDown() {
5453 }
5554 }
5655
57- @ Test
58- public void southAmerica () throws IOException {
59- System .out .println (Timezone .getVersion ("TZDB" ));
60- Timezone .of (AMERICA .SANTIAGO ).dump (System .out );
61- Timezone .of (AMERICA .ARGENTINA .CATAMARCA ).dump (System .out );
62- }
63-
6456 @ Test
6557 public void alias () throws ParseException {
6658 ChronoFormatter <Moment > f =
@@ -73,23 +65,29 @@ public void alias() throws ParseException {
7365 }
7466
7567 @ Test
76- public void findRepository2016e () throws IOException {
77- TimezoneRepositoryProviderSPI p =
78- new TimezoneRepositoryProviderSPI ();
79- assertThat (p .getVersion (), is ("2016e" ));
68+ public void findRepositoryStdVersion () throws IOException {
69+ assertThat (Timezone .getVersion ("TZDB" ), is (STD_VERSION ));
8070 }
8171
8272 @ Test
8373 public void loadAll () {
84- String version = "2016e" ;
85- use (version );
8674 ZoneModelProvider repo = new TimezoneRepositoryProviderSPI ();
87- assertThat (repo .getVersion (), is (version ));
75+ assertThat (repo .getVersion (), is (STD_VERSION ));
8876 for (String tzid : repo .getAvailableIDs ()) {
8977 assertThat (repo .load (tzid ), notNullValue ());
9078 }
9179 }
9280
81+ @ Test
82+ public void tzAfricaCairo () throws IOException {
83+ String version = "2016e" ;
84+ use (version );
85+ ZoneModelProvider repo = new TimezoneRepositoryProviderSPI ();
86+ assertThat (repo .getVersion (), is (version ));
87+ System .out .println ("Africa/Cairo => " + version );
88+ repo .load ("Africa/Cairo" ).dump (System .out );
89+ }
90+
9391 @ Test
9492 public void tzAfricaCasablanca () throws ParseException {
9593 use ("2015a" ); // this version with ramadan modification
0 commit comments