use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_4.
@Test
public void params_choose_new_4() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), true, pApp, pLoc, pDft);
// New store, pLoc, no pApp, so pLoc is the entire settings.
assertFalse(StoreParams.sameValues(p, pApp));
assertFalse(StoreParams.sameValues(p, pLoc));
assertFalse(StoreParams.sameValues(p, pDft));
assertEquals(0, p.getBlockSize().intValue());
assertEquals(12, p.getNodeMissCacheSize().intValue());
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_1.
@Test
public void params_choose_existing_1() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), false, null, null, pDft);
// p is pDft.
assertTrue(StoreParams.sameValues(p, pDft));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_1.
@Test
public void params_choose_new_1() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), true, null, null, pDft);
// New store, no pLoc, no pApp so pDft.
assertTrue(StoreParams.sameValues(p, pDft));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_persist_1.
@Test
public void params_choose_new_persist_1() {
// new database, app defined.
Location loc = Location.create(DIR);
FileOps.clearAll(loc.getDirectoryPath());
// Clear.
StoreParams p = StoreParamsFactory.decideStoreParams(loc, true, pApp, null, pDft);
// Check location now has a pLoc.
String fn = loc.getPath(Names.TDB_CONFIG_FILE);
assertTrue(FileOps.exists(fn));
StoreParams pLoc2 = StoreParamsCodec.read(loc);
assertTrue(StoreParams.sameValues(pLoc2, p));
}
Aggregations