Author: aadamchik
Date: Tue Oct 10 11:18:41 2006
New Revision: 454864
URL: http://svn.apache.org/viewvc?view=rev&rev=454864
Log:
CAY-682 - successful POJO insert itest
Modified:
incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java
Modified:
incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java
URL:
http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java?view=diff&rev=454864&r1=454863&r2=454864
==============================================================================
---
incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java
(original)
+++
incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java
Tue Oct 10 11:18:41 2006
@@ -1,20 +1,36 @@
+/*****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cayenne.itest.pojo;
-
public class SimpleObjectTest extends PojoContextCase {
public void testInsert() throws Exception {
// TODO: andrus, 10/9/2006 - clean up DataContext DataObject
dependency.
-// Entity1 o = (Entity1) context.newObject(Entity1.class);
-// o.setName("X");
-//
-// try {
-// context.commitChanges();
-// }
-// catch (Exception e) {
-// e.printStackTrace();
-// }
-//
-// assertEquals("X", getDbHelper().getObject("entity1", "name"));
+ Entity1 o = (Entity1) context.newObject(Entity1.class);
+ o.setName("X");
+
+ try {
+ context.commitChanges();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ assertEquals("X", getDbHelper().getObject("entity1", "name"));
}
}