コード例 #1
0
  @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());
  }
コード例 #2
0
  @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());
  }
コード例 #3
0
 @Test
 public void testInitializePersistence() {
   SimulationStorePdo store = em.getSimulationStore();
   assertTrue(store.getSimulations().isEmpty());
 }
コード例 #4
0
 @Before
 public void clean() {
   cleanStore();
   em = new SimulationStoreManager();
   em.initializePersistence();
 }