Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-31 23:52:47 -0400
committerEike Stepper2013-04-01 01:42:37 -0400
commitf506b7c1466a97c214b83041923f6bf6107b0cd6 (patch)
tree156e7af22a373b9245101f4678e9a76e9d58e26f
parent9d6790a4b2bfe3a05f5d5011cab9126de510de1e (diff)
downloadcdo-f506b7c1466a97c214b83041923f6bf6107b0cd6.tar.gz
cdo-f506b7c1466a97c214b83041923f6bf6107b0cd6.tar.xz
cdo-f506b7c1466a97c214b83041923f6bf6107b0cd6.zip
Add dynamic package test
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
index 4fd9072ddc..be1f170bfc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
@@ -332,6 +332,23 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ public void testDynamicPackageLoaded() throws Exception
+ {
+ EPackage model1 = loadModel("model1.ecore");
+
+ CDOSession session = openSession();
+ session.getPackageRegistry().putEPackage(model1);
+
+ EFactory modelFactory = model1.getEFactoryInstance(); // Must happen AFTER putEPackage!!!
+ EObject object = modelFactory.create((EClass)model1.getEClassifier("Company"));
+
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath("/res"));
+ resource.getContents().add(object);
+
+ transaction.commit();
+ }
+
@CleanRepositoriesBefore
public void testDynamicPackageFactory() throws Exception
{

Back to the top