Package org.apache.jdo.tck.pc.mylib

Examples of org.apache.jdo.tck.pc.mylib.Point


    */
    public void testGetPersistenceManagerNotPersistenceCapable() {
      pm = getPM();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        Point p1 = new Point(1,3);
        tx.commit();
        PersistenceManager pm1 = JDOHelper.getPersistenceManager(p1);
        if (pm1 != null)
            fail(ASSERTION_FAILED,
                 "JDOHelper.getPersistenceManager called for instance of non-pc class returned non-null pm " + pm1);
View Full Code Here


     */
    public void testIsTransactionalNotPersistenceCapable() {
      pm = getPM();
      Transaction tx = pm.currentTransaction();
      tx.begin();
      Point p1 = new Point(1,3);
        boolean transactional = JDOHelper.isTransactional(p1);
        tx.commit();
        if (transactional)
            fail(ASSERTION_FAILED,
                 "JDOHelper.isTransactional returns true for instance of non-pc class.");
View Full Code Here

    public void testGetSetUserObject() {
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        try {
            tx.begin();
            Point p = new Point(10,10);
            pm.setUserObject(p);
            tx.commit();

            tx.begin();
            Object obj = pm.getUserObject();
View Full Code Here

        pm = null;
    }

    /** */
    private void runTestNonPcClass(PersistenceManager pm) {
        Point p = new Point(1,3);
        Object oid = pm.getObjectId(p);
        if (oid != null) {
            fail(ASSERTION_FAILED,
                 "pm.getObjectId returned non null ObjectId: " + oid +
                 " for instance of non-pc class");
View Full Code Here

    }

    /** */
    private void createObjects() {
        p1 = new PCPoint(1,3);
        p2 = new Point(2,4);
        col1 = new java.util.HashSet();
        col1.add(p1);
        col1.add(p2);
    }
View Full Code Here

       try {
           tx.begin();

           PCPoint np1 = new PCPoint (3,3);
           PCPoint np2 = new PCPoint (4,4);
           Point np3 =  new Point (5,5);
          
           Collection col1 = new java.util.HashSet();
           col1.add(np1);
           col1.add(np2);
           col1.add(np3);
View Full Code Here

        try {
            tx.begin();
           
            PCPoint np1 = new PCPoint (3,3);
            PCPoint np2 = new PCPoint (4,4);
            Point np3 =  new Point (5,5);
           
            Collection col1 = new java.util.HashSet();
            col1.add(np1);
            col1.add(np2);
            col1.add(np3);
View Full Code Here

     */
    public void testIsPersistentNotPersistenceCapable() {
      pm = getPM();
      Transaction tx = pm.currentTransaction();
      tx.begin();
      Point p1 = new Point(1,3);
      boolean persistent = JDOHelper.isPersistent(p1);
      tx.commit();
      if (persistent)
        fail(ASSERTION_FAILED,
                 "JDOHelper.isPersistent returns false for instance of non-pc class.");
View Full Code Here

     */
    public void testGetObjectIdNotPersistenceCapable() {
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        Point p1 = new Point(1,3);
        Object oid = JDOHelper.getObjectId(p1);
        tx.commit();
        if (oid != null)
            fail(ASSERTION_FAILED,
                 "JDOHelper.getObjectId called for instance of non-pc class returned non-null ObjectId " + oid);
View Full Code Here

     */
    public void testGetTransactionalObjectIdNotPersistenceCapable() {
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        Point p1 = new Point(1,3);
        Object oid = JDOHelper.getTransactionalObjectId(p1);
        tx.commit();

        if (oid != null)
            fail(ASSERTION_FAILED,
View Full Code Here

TOP

Related Classes of org.apache.jdo.tck.pc.mylib.Point

Copyright © 2018 www.massapicom. 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.