Package com.google.appengine.datanucleus.jdo

Source Code of com.google.appengine.datanucleus.jdo.Issue165Test

/**********************************************************************
Copyright (c) 2011 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**********************************************************************/
package com.google.appengine.datanucleus.jdo;

import org.datanucleus.util.NucleusLogger;

import com.google.appengine.datanucleus.test.jdo.Issue165Child;
import com.google.appengine.datanucleus.test.jdo.Issue165Parent;

public class Issue165Test extends JDOTestCase {

  public void testInsert() {
    Issue165Child c = new Issue165Child();
    c.setAString("Child info");
    Issue165Parent p = new Issue165Parent();
    p.setAString("Not important");
    p.setChild(c);
    c.setParent(p);
    assertTrue(p.getChild() == c && c.getParent() == p);

    NucleusLogger.GENERAL.info(">> pm.makePersistent");
    pm.makePersistent(p);
    NucleusLogger.GENERAL.info(">> pm.makePersistent done");
  }
}
TOP

Related Classes of com.google.appengine.datanucleus.jdo.Issue165Test

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.