use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsCreate method params_create_02.
@Test
public void params_create_02() {
StoreConnection.make(loc, pApp);
// Check. Custom setup.
assertTrue("DB directory", Files.exists(db));
assertTrue("Config file not found", Files.exists(cfg));
StoreParams pLoc = StoreParamsCodec.read(loc);
assertTrue(StoreParams.sameValues(pLoc, pApp));
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParams method roundTrip.
// --------
private static StoreParams roundTrip(StoreParams params) {
JsonObject obj = StoreParamsCodec.encodeToJson(params);
StoreParams params2 = StoreParamsCodec.decode(obj);
return params2;
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_persist_2.
@Test
public void params_choose_new_persist_2() {
// new database, location defined.
Location loc = Location.create(DIR);
FileOps.clearAll(loc.getDirectoryPath());
StoreParamsCodec.write(loc, pLoc);
// Clear.
StoreParams p = Build.decideStoreParams(loc, true, null, pLoc, pDft);
// Check location still has a pLoc.
String fn = loc.getPath(StoreParamsConst.TDB_CONFIG_FILE);
assertTrue(FileOps.exists(fn));
StoreParams pLoc2 = StoreParamsCodec.read(loc);
assertTrue(StoreParams.sameValues(pLoc, p));
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_3.
@Test
public void params_choose_new_3() {
StoreParams p = Build.decideStoreParams(Location.mem(), true, null, pLoc, pDft);
// New store, pLoc, no pApp, so pLoc is the entire settings.
assertEquals(0, p.getBlockSize().intValue());
assertTrue(StoreParams.sameValues(p, pLoc));
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_1.
@Test
public void params_choose_existing_1() {
StoreParams p = Build.decideStoreParams(Location.mem(), false, null, null, pDft);
// p is pDft.
assertTrue(StoreParams.sameValues(p, pDft));
}
Aggregations