use of org.opendaylight.controller.config.persist.test.PropertiesProviderTest in project controller by opendaylight.
the class DirectoryStorageAdapterTest method instantiatePersisterFromAdapter.
private Persister instantiatePersisterFromAdapter(final File file, final Optional<String> extensions) {
PropertiesProviderTest pp = new PropertiesProviderTest();
pp.addProperty(XmlDirectoryStorageAdapter.DIRECTORY_STORAGE_PROP, file.getPath());
if (extensions.isPresent()) {
pp.addProperty(XmlDirectoryStorageAdapter.INCLUDE_EXT_PROP, extensions.get());
}
XmlDirectoryStorageAdapter dsa = new XmlDirectoryStorageAdapter();
return dsa.instantiate(pp);
}
Aggregations