Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/NoTransactionRule.java')
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/NoTransactionRule.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/NoTransactionRule.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/NoTransactionRule.java
deleted file mode 100644
index b3dee015fda..00000000000
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/NoTransactionRule.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.junit.utils.rules;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.junit.rules.RuleChain;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * This rule provides a ResourceSet with a TransactionalEditingDomain
- *
- * All test methods are executed within a Transaction (Which means test method
- * do not need to care about transactions)
- *
- * Usage:
- *
- * <pre>
- * &#064;Rule
- * public NoTransactionRule noTransaction = new NoTransactionRule();
- * </pre>
- *
- * @author Camille Letavernier
- */
-public class NoTransactionRule implements TestRule {
-
- private final ModelSetFixture modelSet = new ModelSetFixture();
-
- private final NoTransactionFixture noTransaction = new NoTransactionFixture(modelSet);
-
- public RuleChain getRuleChain() {
- return RuleChain.outerRule(modelSet).around(noTransaction);
- }
-
- public Statement apply(Statement base, Description description) {
- return getRuleChain().apply(base, description);
- }
-
- public ResourceSet getResourceSet() {
- return modelSet.getResourceSet();
- }
-
- public Resource getModelResource() {
- return modelSet.getModelResource();
- }
-}

Back to the top