Examples of BobForAutoSaveInMethodTest


Examples of net.sf.joafip.entity.rel400.BobForAutoSaveInMethodTest

      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException, ProxyException {
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    BobForAutoSaveInMethodTest bob = BobForAutoSaveInMethodTest
        .newInstance(instanceFactory);
    assertEquals("bad initial state", 0, bob.getValue());
    saveDoneFlag = false;
    int expectedIncrement = 1;
    for (int count = 0; count < 5; count++) {
      bob.incrementValue();
      assertTrue(MUST_SAVE, saveDoneFlag);
      assertTrue("must be unloaded", ProxyManager2.isUnloaded(bob));
      assertEquals("bad state", expectedIncrement, bob.getValue());
      expectedIncrement++;
    }
    session.setObject(KEY, bob);
    session.close();

    session.open();
    bob = (BobForAutoSaveInMethodTest) session.getObject(KEY);
    assertEquals("bad state", expectedIncrement - 1, bob.getValue());
    session.close();

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.