openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1690069 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta: EntityBoolChar.java TestMappingToolRefresh.java
Date Thu, 09 Jul 2015 11:51:39 GMT
Author: struberg
Date: Thu Jul  9 11:51:39 2015
New Revision: 1690069

URL: http://svn.apache.org/r1690069
Log:
create own test entity for testing different configuration

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java
  (with props)
Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolRefresh.java

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java?rev=1690069&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java
(added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java
Thu Jul  9 11:51:39 2015
@@ -0,0 +1,46 @@
+/*
+ * 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.jdbc.meta;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class EntityBoolChar {
+    
+    @Id
+    @GeneratedValue
+    private int id;
+
+    private boolean dummy;
+    
+    public boolean isDummy() {
+        return dummy;
+    }
+    
+    public void setDummy(boolean value) {
+        dummy = value;
+    }
+    
+    public int getId() {
+        return id;
+    }
+}
+

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/EntityBoolChar.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolRefresh.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolRefresh.java?rev=1690069&r1=1690068&r2=1690069&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolRefresh.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolRefresh.java
Thu Jul  9 11:51:39 2015
@@ -43,7 +43,7 @@ public class TestMappingToolRefresh exte
      */
     @Test
     public void testSchemaCreation() throws Exception {
-        Map<String, Object> emfProps = getPropertiesMap(EntityBool.class,
+        Map<String, Object> emfProps = getPropertiesMap(EntityBoolChar.class,
                 "openjpa.jdbc.SynchronizeMappings",
                 "buildSchema(ForeignKeys=true, SchemaAction='add,deleteTableContents')",
                 "openjpa.jdbc.DBDictionary",
@@ -57,7 +57,7 @@ public class TestMappingToolRefresh exte
             OpenJPAEntityManagerSPI em = openjpaEmf.createEntityManager();
             assertNotNull(em);
             em.getTransaction().begin();
-            EntityBool val = new EntityBool();
+            EntityBoolChar val = new EntityBoolChar();
             val.setDummy(true);
             em.persist(val);
 
@@ -68,7 +68,7 @@ public class TestMappingToolRefresh exte
             OpenJPAEntityManagerSPI em2 = openjpaEmf.createEntityManager();
             assertNotNull(em2);
 
-            EntityBool val2 = em2.find(EntityBool.class, id);
+            EntityBoolChar val2 = em2.find(EntityBoolChar.class, id);
             assertNotNull(val2);
             assertNotEquals(val, val2);
 
@@ -86,7 +86,7 @@ public class TestMappingToolRefresh exte
 
             String[] entityClassFiles = new String[1];
             URL entityClassUrl = this.getClass().getClassLoader().
-                    getResource(EntityBool.class.getName().replace(".", "/") + ".class");
+                    getResource(EntityBoolChar.class.getName().replace(".", "/") + ".class");
             entityClassFiles[0] = entityClassUrl.getFile();
 
             MappingTool.Flags flags = new MappingTool.Flags();



Mime
View raw message