use of org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder in project controller by opendaylight.
the class DirectoryStorageAdapterTest method testTwoFilesOnlyOneExtension.
@Test
public void testTwoFilesOnlyOneExtension() throws Exception {
File folder = getFolder("twoFiles");
tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
LOG.info("Testing : ", tested);
List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
assertEquals(1, results.size());
assertResult(results.get(0), "<config>1</config>", "cap1-a", "cap2-a", "capa a-a");
}
use of org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder in project controller by opendaylight.
the class DirectoryStorageAdapterTest method testTwoFilesOneInvalid.
@Test
public void testTwoFilesOneInvalid() throws Exception {
File folder = getFolder("twoFiles_corrupt");
tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
LOG.info("Testing : {}", tested);
List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
assertEquals(1, results.size());
assertResult(results.get(0), "<config>1</config>", "cap1-a", "cap2-a", "capa a-a");
}
Aggregations