use of org.openkilda.config.provider.PropertiesBasedConfigurationProvider in project open-kilda by telstra.
the class InMemoryGraphBasedTest method initPersistenceManager.
@BeforeClass
public static void initPersistenceManager() {
Properties properties = new Properties();
properties.put("persistence.implementation.default", PersistenceImplementationType.IN_MEMORY_GRAPH.name());
configurationProvider = new PropertiesBasedConfigurationProvider(properties);
inMemoryGraphPersistenceImplementation = new InMemoryGraphPersistenceImplementation(configurationProvider);
InMemoryGraphPersistenceImplementation persistenceImplementation = Mockito.spy(inMemoryGraphPersistenceImplementation);
repositoryFactory = Mockito.spy(inMemoryGraphPersistenceImplementation.getRepositoryFactory());
Mockito.when(persistenceImplementation.getRepositoryFactory()).thenReturn(repositoryFactory);
inMemoryGraphPersistenceManager = new InMemoryGraphPersistenceManager(configurationProvider, PersistenceImplementationType.IN_MEMORY_GRAPH, persistenceImplementation);
inMemoryGraphPersistenceManager.install();
persistenceManager = Mockito.spy(inMemoryGraphPersistenceManager);
transactionManager = inMemoryGraphPersistenceManager.getTransactionManager();
}
Aggregations