public void store() {
   Test.deleteAllInstances(new Atom());
   Test.deleteAllInstances(this);
   CascadeToExistingVectorMember cev = new CascadeToExistingVectorMember();
   cev.vec = new Vector();
   Atom atom = new Atom("one");
   Test.store(atom);
   cev.vec.addElement(atom);
   Test.store(cev);
 }
 public void store() {
   Test.deleteAllInstances(this);
   //        Test.store(new TestStringBuffer("Aloha"));
   //        Test.store(new TestStringBuffer("Yohaa"));
   Test.store(new TestStringBuffer("Aloe Vera"));
   //        Test.store(new TestStringBuffer("Store Aloha"));
 }
Esempio n. 3
0
  public void test() {

    ObjectContainer con = Test.objectContainer();
    Test.deleteAllInstances(this);

    IsStored isStored = new IsStored();
    isStored.myString = "isStored";
    con.store(isStored);
    Test.ensure(con.ext().isStored(isStored));
    Test.ensure(Test.occurrences(this) == 1);
    con.delete(isStored);
    Test.ensure(!con.ext().isStored(isStored));
    Test.ensure(Test.occurrences(this) == 0);
    con.commit();
    if (con.ext().isStored(isStored)) {

      // this will fail in CS due to locally cached references
      if (!Test.clientServer) {
        Test.error();
      }
    }
    Test.ensure(Test.occurrences(this) == 0);
    con.store(isStored);
    Test.ensure(con.ext().isStored(isStored));
    Test.ensure(Test.occurrences(this) == 1);
    con.commit();
    Test.ensure(con.ext().isStored(isStored));
    Test.ensure(Test.occurrences(this) == 1);
    con.delete(isStored);
    Test.ensure(!con.ext().isStored(isStored));
    Test.ensure(Test.occurrences(this) == 0);
    con.commit();
    if (con.ext().isStored(isStored)) {

      // this will fail in CS due to locally cached references
      if (!Test.clientServer) {
        Test.error();
      }
    }
    Test.ensure(Test.occurrences(this) == 0);
  }
Esempio n. 4
0
 public void storeOne() {
   Test.deleteAllInstances(this);
   _name = "p1";
   _next = new CallbackCanDelete("c1", null);
 }