コード例 #1
0
 @Test
 public void testSharedStore() throws IOException {
   StreamStore store1 = StoreFactory.sharedLocalStore();
   StreamStore store2 = StoreFactory.sharedLocalStore();
   File f1 = new File(store1.getLocation(store1.store(resource1()))).getParentFile();
   File f2 = new File(store2.getLocation(store2.store(resource1()))).getParentFile();
   assertEquals("Shared Stores should share the same parent (since they are shared)", f1, f2);
 }
コード例 #2
0
 @Test
 public void testPuttingTheSameResourceTwice() throws IOException {
   StreamStore store = StoreFactory.sharedLocalStore();
   String id1 = store.store(resource1()).getIdentification();
   String id2 = store.store(resource1()).getIdentification();
   assertEquals(id1, id2);
 }