コード例 #1
0
ファイル: OkapiClientTest.java プロジェクト: sababys/cgeo
 public static void testGetOCCache() {
   final String geoCode = "OU0331";
   Geocache cache = OkapiClient.getCache(geoCode);
   assertThat(cache).as("Cache from OKAPI").isNotNull();
   assert cache != null; // eclipse null analysis
   assertThat(cache.getGeocode()).isEqualTo(geoCode);
   assertThat(cache.getName()).isEqualTo("Oshkosh Municipal Tank");
   assertThat(cache.isDetailed()).isTrue();
   // cache should be stored to DB (to listID 0) when loaded above
   cache = DataStore.loadCache(geoCode, LoadFlags.LOAD_ALL_DB_ONLY);
   assert cache != null;
   assertThat(cache).isNotNull();
   assertThat(cache.getGeocode()).isEqualTo(geoCode);
   assertThat(cache.getName()).isEqualTo("Oshkosh Municipal Tank");
   assertThat(cache.isDetailed()).isTrue();
   assertThat(cache.getOwnerDisplayName()).isNotEmpty();
   assertThat(cache.getOwnerUserId()).isEqualTo(cache.getOwnerDisplayName());
 }