diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java index 2439bf021b..7593b68a9d 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329869_Test.java @@ -1,57 +1,57 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Fluegge - initial API and implementation
- */
-package org.eclipse.emf.cdo.tests.bugzilla;
-
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.tests.AbstractCDOTest;
-import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
-import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-/**
- * @author Martin Fluegge
- */
-public class Bugzilla_329869_Test extends AbstractCDOTest
-{
- public void testDuplicateID() throws Exception
- {
- {
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
-
- Resource resource = transaction.createResource(getResourcePath("/test"));
-
- RefMultiNonContainedUnsettable parent = getModel4Factory().createRefMultiNonContainedUnsettable();
- MultiNonContainedUnsettableElement child = getModel4Factory().createMultiNonContainedUnsettableElement();
-
- parent.getElements().add(child);
-
- resource.getContents().add(parent);
- resource.getContents().add(child);
- transaction.commit();
- session.close();
- }
-
- {
- CDOSession session = openSession();
- CDOTransaction transaction2 = session.openTransaction();
- Resource resource2 = transaction2.getResource(getResourcePath("/test"));
-
- RefMultiNonContainedUnsettable parent = (RefMultiNonContainedUnsettable)resource2.getContents().get(0);
- MultiNonContainedUnsettableElement element = getModel4Factory().createMultiNonContainedUnsettableElement();
- element.setParent(parent);
- resource2.getContents().add(element);
- transaction2.commit();
- }
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Martin Fluegge - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.bugzilla; + +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.tests.AbstractCDOTest; +import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement; +import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable; +import org.eclipse.emf.cdo.transaction.CDOTransaction; + +import org.eclipse.emf.ecore.resource.Resource; + +/** + * @author Martin Fluegge + */ +public class Bugzilla_329869_Test extends AbstractCDOTest +{ + public void testDuplicateID() throws Exception + { + { + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + + Resource resource = transaction.createResource(getResourcePath("/test")); + + RefMultiNonContainedUnsettable parent = getModel4Factory().createRefMultiNonContainedUnsettable(); + MultiNonContainedUnsettableElement child = getModel4Factory().createMultiNonContainedUnsettableElement(); + + parent.getElements().add(child); + + resource.getContents().add(parent); + resource.getContents().add(child); + transaction.commit(); + session.close(); + } + + { + CDOSession session = openSession(); + CDOTransaction transaction2 = session.openTransaction(); + Resource resource2 = transaction2.getResource(getResourcePath("/test")); + + RefMultiNonContainedUnsettable parent = (RefMultiNonContainedUnsettable)resource2.getContents().get(0); + MultiNonContainedUnsettableElement element = getModel4Factory().createMultiNonContainedUnsettableElement(); + element.setParent(parent); + resource2.getContents().add(element); + transaction2.commit(); + } + } +} |