openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r614806 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test: java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml
Date Thu, 24 Jan 2008 06:56:17 GMT
Author: pcl
Date: Wed Jan 23 22:56:14 2008
New Revision: 614806

URL: http://svn.apache.org/viewvc?rev=614806&view=rev
Log:
OPENJPA-503

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java?rev=614806&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java
(added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestPersistenceUnitWithoutXSD.java
Wed Jan 23 22:56:14 2008
@@ -0,0 +1,44 @@
+/*
+ * 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.openjpa.persistence.xml;
+
+import javax.persistence.EntityManagerFactory;
+
+import org.apache.openjpa.persistence.test.PersistenceTestCase;
+import org.apache.openjpa.persistence.OpenJPAPersistence;
+import org.apache.openjpa.enhance.PCEnhancer;
+
+public class TestPersistenceUnitWithoutXSD extends PersistenceTestCase {
+
+    public void testPersistenceUnitWithoutXSD() {
+        EntityManagerFactory emf = OpenJPAPersistence
+            .createEntityManagerFactory("incorrect-ordering-and-no-xsd",
+                "org/apache/openjpa/persistence/xml/persistence-without-xsd.xml");
+        emf.createEntityManager().close();
+        emf.close();
+    }
+
+    public void testEnhancer() {
+        PCEnhancer.main(new String[] {
+            "-p",
+            "org/apache/openjpa/persistence/xml/persistence-without-xsd.xml",
+            SimpleXmlEntity.class.getName()
+        });
+    }
+}

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml?rev=614806&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml
(added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/persistence-without-xsd.xml
Wed Jan 23 22:56:14 2008
@@ -0,0 +1,9 @@
+<persistence>
+    <persistence-unit name="incorrect-ordering-and-no-xsd">
+        <properties>
+            <property name="openjpa.Id" value="incorrect-ordering-pu"/>
+        </properties>
+        <class>org.apache.openjpa.persistence.xml.SimpleXmlEntity</class>
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+    </persistence-unit>
+</persistence>
\ No newline at end of file



Mime
View raw message