Examples of BobContainer


Examples of net.sf.joafip.store.service.objectfortest.BobContainer

      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException {
    final IDataAccessSession session = filePersistence
        .createDataAccessSession();
    BobContainer bob = new BobContainer();
    bob.setObject1(Integer.valueOf(0));
    session.open();
    session.setObject("bob", bob);
    session.close(EnumFilePersistenceCloseAction.SAVE);

    session.open();
    bob = (BobContainer) session.getObject("bob");
    session.close(EnumFilePersistenceCloseAction.SAVE);

    try {
      bob.getObject1();
      fail("must have exception");// NOPMD
    } catch (final Throwable throwable) {// NOPMD
      // normal case must failed get object
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobContainer

    assertEquals(BAD_PATH, expected, creator.pathToObject(graph, bob2));
  }

  public void test2() throws GraphException {
    final BobContainer bobContainer = new BobContainer();
    bobContainer.setObject1(bobContainer);
    final Bob1 bob1 = new Bob1();
    bobContainer.setObject2(bob1);
    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(bobContainer);
    assertEquals(
        BAD_PATH,
        ""// NOPMD
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobContainer

            + "\n",
        /**/creator.pathToObject(graph, bob1));
  }

  public void test3() throws GraphException {
    final BobContainer bobContainer = new BobContainer();
    bobContainer.setObject1(bobContainer);
    final Bob1 bob1 = new Bob1();
    bobContainer.setObject2(bob1);
    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(bobContainer);
    assertEquals(
        BAD_PATH,
        ""// NOPMD
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobContainer

            + "\n"
        /**/, creator.pathToObject(graph, bobContainer));
  }

  public void test4() throws GraphException {
    final BobContainer bobContainer = new BobContainer();
    final String string = "hello";
    bobContainer.setObject1(string);
    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(bobContainer);
    assertEquals(
        BAD_PATH,
        ""// NOPMD
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobContainer

            + "\n",
        /**/creator.pathToObject(graph, string));
  }

  public void test5() throws GraphException {
    final BobContainer bobContainer = new BobContainer();
    final String string = "hello";
    final String[] strings = new String[] { string, "bonjour" };
    bobContainer.setObject1(strings);
    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(bobContainer);
    assertEquals(
        BAD_PATH,
        ""// NOPMD
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobContainer

  }

  public void test7() throws GraphException {
    // o1 -> o2 -> o3 -> o4 -> o5 -> o6
    // ...-> o7 -> ........ -> o8 ->
    final BobContainer obj1 = new BobContainer();
    final BobContainer obj2 = new BobContainer();
    final BobContainer obj3 = new BobContainer();
    final BobContainer obj4 = new BobContainer();
    final BobContainer obj5 = new BobContainer();
    final BobContainer obj6 = new BobContainer();
    final BobContainer obj7 = new BobContainer();
    final BobContainer obj8 = new BobContainer();
    obj1.setObject1(obj2);
    obj2.setObject1(obj3);
    obj3.setObject1(obj4);
    obj4.setObject1(obj5);
    obj5.setObject1(obj6);

    obj1.setObject2(obj7);
    obj7.setObject1(obj3);

    obj4.setObject2(obj8);
    obj8.setObject1(obj6);

    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(obj1);
    assertEquals(
        BAD_PATH,
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.