// Setup
Config testConfig = TestConfigUtil.createTestLocalConfig();
// Run
ConfigTO loadedConfigTO = ConfigHelper.loadConfigTO(testConfig.getLocalDir());
RepoTO repoConfigTO = ConfigHelper.loadRepoTO(testConfig.getLocalDir(), loadedConfigTO);
// Test
assertNotNull(repoConfigTO);
assertNotNull(repoConfigTO.getChunkerTO());
assertNotNull(repoConfigTO.getMultiChunker());
assertNotNull(repoConfigTO.getRepoId());
if (TestConfigUtil.getCrypto()) {
assertNotNull(repoConfigTO.getTransformers());
assertEquals(2, repoConfigTO.getTransformers().size());
assertEquals("gzip", repoConfigTO.getTransformers().get(0).getType());
assertEquals("cipher", repoConfigTO.getTransformers().get(1).getType());
}
else {
assertNull(repoConfigTO.getTransformers());
}
assertEquals("fixed", repoConfigTO.getChunkerTO().getType());
assertEquals(1, repoConfigTO.getChunkerTO().getSettings().size());
assertEquals("zip", repoConfigTO.getMultiChunker().getType());
assertEquals(1, repoConfigTO.getMultiChunker().getSettings().size());
assertEquals("010203", StringUtil.toHex(repoConfigTO.getRepoId()));
// Tear down
TestConfigUtil.deleteTestLocalConfigAndData(testConfig);
}