@Test public void testSaveStore() { SimulationStorePdo store = new SimulationStorePdo(); store.addSimulation(new SimulationPdo()); em.saveSimulationStore(store); SimulationStorePdo managerStore = em.getSimulationStore(); assertEquals(store, managerStore); assertEquals(1, managerStore.getSimulations().size()); }
@Test public void testSaveAndLoadStore() { SimulationStorePdo store = new SimulationStorePdo(); store.addSimulation(new SimulationPdo()); em.saveSimulationStore(store); SimulationStoreManager em2 = new SimulationStoreManager(); em2.initializePersistence(); SimulationStorePdo managerStore = em2.getSimulationStore(); assertEquals(1, managerStore.getSimulations().size()); }
@Test public void testInitializePersistence() { SimulationStorePdo store = em.getSimulationStore(); assertTrue(store.getSimulations().isEmpty()); }
@Before public void clean() { cleanStore(); em = new SimulationStoreManager(); em.initializePersistence(); }