-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 466271: Abstract MappedSuperclass in separate JAR is not weaved s…
…tatically Signed-off-by: Lukas Jungmann <[email protected]> Reviewed-by: Petros, MartinG
- Loading branch information
Showing
10 changed files
with
157 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...nk.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/WeaverTestSuite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.eclipse.persistence.testing.tests.jpa21.advanced; | ||
|
||
import java.util.Arrays; | ||
|
||
import javax.persistence.EntityManagerFactory; | ||
import javax.persistence.metamodel.ManagedType; | ||
|
||
import org.eclipse.persistence.internal.descriptors.PersistenceEntity; | ||
import org.eclipse.persistence.testing.framework.junit.JUnitTestCase; | ||
import org.eclipse.persistence.testing.models.jpa21.advanced.Athlete; | ||
import org.junit.Assert; | ||
|
||
import junit.framework.Test; | ||
import junit.framework.TestSuite; | ||
|
||
public class WeaverTestSuite extends JUnitTestCase { | ||
|
||
public WeaverTestSuite(String name) { | ||
super(name); | ||
} | ||
|
||
@Override | ||
public String getPersistenceUnitName() { | ||
return "pu-with-mappedsuperclass"; | ||
} | ||
|
||
|
||
public static Test suite() { | ||
TestSuite suite = new TestSuite(); | ||
suite.setName("WeaverTestSuite"); | ||
|
||
suite.addTest(new WeaverTestSuite("testMappedSuperclassWeaving")); | ||
|
||
return suite; | ||
} | ||
|
||
//bug #466271 - @MappedSuperclass with no implementations should be woven | ||
public void testMappedSuperclassWeaving() { | ||
EntityManagerFactory emf = getEntityManagerFactory(); | ||
ManagedType<Athlete> managedType = emf.getMetamodel().managedType(Athlete.class); | ||
Class<Athlete> javaClass = emf.getMetamodel().managedType(Athlete.class).getJavaType(); | ||
Assert.assertTrue(Arrays.asList(javaClass.getInterfaces()).contains(PersistenceEntity.class)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.