summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmusset2009-03-05 12:14:15 (EST)
committerjmusset2009-03-05 12:14:15 (EST)
commit4577d1d8c2f925e340ee48e6514ab96aeb9b5ad1 (patch)
treea810ac923dc3ae6731ef68af54cb87822c479ac9
parent7593ef1c4d903a75f7a6946fc8b6b10cc0d7ad9d (diff)
downloadorg.eclipse.acceleo-4577d1d8c2f925e340ee48e6514ab96aeb9b5ad1.zip
org.eclipse.acceleo-4577d1d8c2f925e340ee48e6514ab96aeb9b5ad1.tar.gz
org.eclipse.acceleo-4577d1d8c2f925e340ee48e6514ab96aeb9b5ad1.tar.bz2
format after renaming
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/suite/AllTests.java2
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/AbstractAcceleoTest.java14
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/protectedareablock/ProtectedAreaBlockTest.java8
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/template/TemplateTest.java16
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/engine/AcceleoGenericEngineTest.java24
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoNonStandardLibraryTest.java13
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoStandardLibraryTest.java16
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/listeners/AcceleoListenersTest.java19
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/NamesakeGuardResolutionTest.java37
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/ParameterTypeNarrowingResolutionTest.java62
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/SimpleNamesakeResolutionTest.java38
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideGuardResolutionTest.java12
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideParameterTypeNarrowingResolutionTest.java21
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/SimpleOverridesResolutionTest.java29
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/AcceleoEnginePluginTest.java45
-rw-r--r--tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/MessagesTest.java27
16 files changed, 208 insertions, 175 deletions
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/suite/AllTests.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/suite/AllTests.java
index e16299b..3335d69 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/suite/AllTests.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/suite/AllTests.java
@@ -68,7 +68,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(AcceleoGenericEngineTest.class);
// Listeners
- //FIXME LGO suite.addTestSuite(AcceleoListenersTest.class);
+ // FIXME LGO suite.addTestSuite(AcceleoListenersTest.class);
// Namesakes
suite.addTestSuite(SimpleNamesakeResolutionTest.class);
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/AbstractAcceleoTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/AbstractAcceleoTest.java
index b8be8fb..440515d 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/AbstractAcceleoTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/AbstractAcceleoTest.java
@@ -21,6 +21,11 @@ import junit.framework.Assert;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
+import org.eclipse.acceleo.common.utils.ModelUtils;
+import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.acceleo.parser.AcceleoParser;
+import org.eclipse.acceleo.parser.AcceleoSourceBuffer;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
@@ -29,11 +34,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.acceleo.model.mtl.Module;
-import org.eclipse.acceleo.common.utils.ModelUtils;
-import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
-import org.eclipse.acceleo.parser.AcceleoParser;
-import org.eclipse.acceleo.parser.AcceleoSourceBuffer;
import org.osgi.framework.Bundle;
/**
@@ -94,8 +94,8 @@ public abstract class AbstractAcceleoTest extends TestCase {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + DEFAULT_MODEL_LOCATION, true);
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + DEFAULT_MODEL_LOCATION, true);
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/protectedareablock/ProtectedAreaBlockTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/protectedareablock/ProtectedAreaBlockTest.java
index f6c011b..93a44f3 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/protectedareablock/ProtectedAreaBlockTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/protectedareablock/ProtectedAreaBlockTest.java
@@ -15,11 +15,11 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationContext;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
/**
* Class to test Protected Area block.
@@ -166,8 +166,8 @@ public class ProtectedAreaBlockTest extends AbstractAcceleoTest {
final List<EObject> templateArgs = new ArrayList<EObject>(1);
templateArgs.add(target);
- AcceleoService
- .doGenerateTemplate(module, "test_lost_protected_area", templateArgs, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerateTemplate(module,
+ "test_lost_protected_area", templateArgs, generationRoot, false); //$NON-NLS-1$
try {
AcceleoEvaluationContext.awaitCompletion();
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/template/TemplateTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/template/TemplateTest.java
index 48ff26c..c815fdb 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/template/TemplateTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/blocks/template/TemplateTest.java
@@ -15,26 +15,26 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
- * This will test the behavior of the Acceleo engine on all aspects of the "template" Acceleo block. This includes
- * template invocation specific features such as "before" and "after".
+ * This will test the behavior of the Acceleo engine on all aspects of the "template" Acceleo block. This
+ * includes template invocation specific features such as "before" and "after".
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
public class TemplateTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/engine/AcceleoGenericEngineTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/engine/AcceleoGenericEngineTest.java
index 2353266..8f03818 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/engine/AcceleoGenericEngineTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/engine/AcceleoGenericEngineTest.java
@@ -18,15 +18,15 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.acceleo.model.mtl.ModuleElement;
-import org.eclipse.acceleo.model.mtl.Template;
-import org.eclipse.acceleo.model.mtl.VisibilityKind;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.AcceleoEvaluationException;
import org.eclipse.acceleo.engine.generation.AcceleoGenericEngine;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.ModuleElement;
+import org.eclipse.acceleo.model.mtl.Template;
+import org.eclipse.acceleo.model.mtl.VisibilityKind;
+import org.eclipse.emf.common.util.URI;
/**
* This will be used to test the behavior of the generic Acceleo engine.
@@ -59,8 +59,8 @@ public class AcceleoGenericEngineTest extends AbstractAcceleoTest {
/** This initializer allows us to initialize all required input. */
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true);
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true);
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model.");
@@ -265,8 +265,8 @@ public class AcceleoGenericEngineTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate, validArguments,
- generationRoot, false);
+ Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate,
+ validArguments, generationRoot, false);
assertTrue("Preview map should have been empty", preview.isEmpty());
try {
@@ -295,8 +295,8 @@ public class AcceleoGenericEngineTest extends AbstractAcceleoTest {
public void testEvaluatePublicTemplateValidArgsNullRootPreview() throws IOException {
generationRoot = new File(getGenerationRootPath("PublicTemplateValidArgsNullRootPreview"));
- Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate, validArguments,
- null, true);
+ Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate,
+ validArguments, null, true);
assertFalse("Preview map was empty", preview.isEmpty());
assertSame("There should have been a single result for preview", 1, preview.size());
@@ -323,8 +323,8 @@ public class AcceleoGenericEngineTest extends AbstractAcceleoTest {
public void testEvaluatePublicTemplateValidArgsPreview() throws IOException {
generationRoot = new File(getGenerationRootPath("PublicTemplateValidArgsPreview"));
- Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate, validArguments,
- generationRoot, true);
+ Map<String, StringWriter> preview = new AcceleoGenericEngine().evaluate(publicTemplate,
+ validArguments, generationRoot, true);
assertFalse("Preview map was empty", preview.isEmpty());
assertSame("There should have been a single result for preview", 1, preview.size());
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoNonStandardLibraryTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoNonStandardLibraryTest.java
index 654e0a5..8630940 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoNonStandardLibraryTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoNonStandardLibraryTest.java
@@ -19,6 +19,11 @@ import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import org.eclipse.acceleo.common.utils.AcceleoNonStandardLibrary;
+import org.eclipse.acceleo.engine.event.AcceleoTextGenerationListener;
+import org.eclipse.acceleo.engine.internal.environment.AcceleoEnvironmentFactory;
+import org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment;
+import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EAttribute;
@@ -30,11 +35,6 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.acceleo.common.utils.AcceleoNonStandardLibrary;
-import org.eclipse.acceleo.engine.event.AcceleoTextGenerationListener;
-import org.eclipse.acceleo.engine.internal.environment.AcceleoEnvironmentFactory;
-import org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment;
-import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
import org.eclipse.ocl.ecore.OCL;
/**
@@ -65,7 +65,8 @@ public class AcceleoNonStandardLibraryTest extends AbstractAcceleoTest {
}
nonStdLib.put(AcceleoNonStandardLibrary.PRIMITIVE_STRING_NAME, copyOperations);
- List<EOperation> oclAnyOperations = lib.getExistingOperations(AcceleoNonStandardLibrary.TYPE_OCLANY_NAME);
+ List<EOperation> oclAnyOperations = lib
+ .getExistingOperations(AcceleoNonStandardLibrary.TYPE_OCLANY_NAME);
copyOperations = new ArrayList<EOperation>(oclAnyOperations.size());
for (EOperation operation : oclAnyOperations) {
copyOperations.add((EOperation)EcoreUtil.copy(operation));
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoStandardLibraryTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoStandardLibraryTest.java
index 2f33fdd..7b70ec7 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoStandardLibraryTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/environment/AcceleoStandardLibraryTest.java
@@ -16,17 +16,17 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.acceleo.common.utils.AcceleoStandardLibrary;
+import org.eclipse.acceleo.engine.event.AcceleoTextGenerationListener;
+import org.eclipse.acceleo.engine.internal.environment.AcceleoEnvironmentFactory;
+import org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment;
+import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.acceleo.common.utils.AcceleoStandardLibrary;
-import org.eclipse.acceleo.engine.event.AcceleoTextGenerationListener;
-import org.eclipse.acceleo.engine.internal.environment.AcceleoEnvironmentFactory;
-import org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment;
-import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
import org.eclipse.ocl.ecore.OCL;
/**
@@ -49,14 +49,16 @@ public class AcceleoStandardLibraryTest extends AbstractAcceleoTest {
{
AcceleoStandardLibrary lib = new AcceleoStandardLibrary();
- List<EOperation> intOperations = lib.getExistingOperations(AcceleoStandardLibrary.PRIMITIVE_INTEGER_NAME);
+ List<EOperation> intOperations = lib
+ .getExistingOperations(AcceleoStandardLibrary.PRIMITIVE_INTEGER_NAME);
List<EOperation> copyOperations = new ArrayList<EOperation>(intOperations.size());
for (EOperation operation : intOperations) {
copyOperations.add((EOperation)EcoreUtil.copy(operation));
}
stdLib.put(AcceleoStandardLibrary.PRIMITIVE_INTEGER_NAME, copyOperations);
- List<EOperation> realOperations = lib.getExistingOperations(AcceleoStandardLibrary.PRIMITIVE_REAL_NAME);
+ List<EOperation> realOperations = lib
+ .getExistingOperations(AcceleoStandardLibrary.PRIMITIVE_REAL_NAME);
copyOperations = new ArrayList<EOperation>(realOperations.size());
for (EOperation operation : realOperations) {
copyOperations.add((EOperation)EcoreUtil.copy(operation));
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/listeners/AcceleoListenersTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/listeners/AcceleoListenersTest.java
index 83ed823..d26d597 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/listeners/AcceleoListenersTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/listeners/AcceleoListenersTest.java
@@ -16,17 +16,18 @@ import java.io.StringWriter;
import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.acceleo.model.mtl.Block;
import org.eclipse.acceleo.engine.event.AcceleoTextGenerationEvent;
import org.eclipse.acceleo.engine.event.AcceleoTextGenerationListener;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Block;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
/**
- * This test allows us to check the behavior of the listeners that can be set up on the Acceleo generation engine.
+ * This test allows us to check the behavior of the listeners that can be set up on the Acceleo generation
+ * engine.
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
@@ -126,8 +127,8 @@ public class AcceleoListenersTest extends AbstractAcceleoTest {
}
/**
- * This implementation of an AcceleoTextGenerationListener allows us to check that the accurate info is set on
- * the generation events.
+ * This implementation of an AcceleoTextGenerationListener allows us to check that the accurate info is
+ * set on the generation events.
*/
private class AcceleoGenerationEventTestListener implements AcceleoTextGenerationListener {
/** The generated text itself. */
@@ -179,8 +180,8 @@ public class AcceleoListenersTest extends AbstractAcceleoTest {
}
/**
- * This implementation of an AcceleoTextGenerationListener allows us to count the number of times the engine
- * generated text.
+ * This implementation of an AcceleoTextGenerationListener allows us to count the number of times the
+ * engine generated text.
*/
private class AcceleoGenerationCountListener implements AcceleoTextGenerationListener {
/** This will be incremented for each call to {@link #textGenerated(AcceleoTextGenerationEvent)}. */
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/NamesakeGuardResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/NamesakeGuardResolutionTest.java
index 387b536..129c031 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/NamesakeGuardResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/NamesakeGuardResolutionTest.java
@@ -15,14 +15,14 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
* This will test the behavior of the Acceleo engine when resolving name conflicts in guarded template calls.
@@ -32,8 +32,8 @@ import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
public class NamesakeGuardResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
@@ -62,9 +62,9 @@ public class NamesakeGuardResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. No template is more specific than the other as far as
- * parameters are concerned, but only the imported template has its guard evaluated to true. We then
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. No template is more specific than the other as far
+ * as parameters are concerned, but only the imported template has its guard evaluated to true. We then
* expect the engine to use the imported template.
*/
public void testNamesakeGuard() throws IOException {
@@ -88,10 +88,10 @@ public class NamesakeGuardResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. The extended template is less specific than the local
- * and imported ones, yet the local one has its guard evaluated to false. We then expect the engine to use
- * the imported template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. The extended template is less specific than the
+ * local and imported ones, yet the local one has its guard evaluated to false. We then expect the engine
+ * to use the imported template.
*/
public void testNamesakeGuardImportSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeGuardImportSpecific")); //$NON-NLS-1$
@@ -115,10 +115,10 @@ public class NamesakeGuardResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. The imported template is less specific than the local
- * and extended ones, yet both have their guards evaluated to false. We then expect the engine to use the
- * imported template even though less specific.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. The imported template is less specific than the
+ * local and extended ones, yet both have their guards evaluated to false. We then expect the engine to
+ * use the imported template even though less specific.
*/
public void testNamesakeGuardedSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeGuardedSpecific")); //$NON-NLS-1$
@@ -126,7 +126,8 @@ public class NamesakeGuardResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_namesake_guarded_specific", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService
+ .doGenerate(module, "test_namesake_guarded_specific", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/ParameterTypeNarrowingResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/ParameterTypeNarrowingResolutionTest.java
index 0b5095e..4d76fe8 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/ParameterTypeNarrowingResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/ParameterTypeNarrowingResolutionTest.java
@@ -15,26 +15,27 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
- * This will test the behavior of the Acceleo engine when resolving name conflicts in template calls. Templates
- * will narrow the parameter type : some have parameter types "EClassifier" while namesakes have "EClass".
+ * This will test the behavior of the Acceleo engine when resolving name conflicts in template calls.
+ * Templates will narrow the parameter type : some have parameter types "EClassifier" while namesakes have
+ * "EClass".
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
@@ -63,9 +64,9 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. We expect it to select the most specific one which is
- * here on the extended template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. We expect it to select the most specific one which
+ * is here on the extended template.
*/
public void testNamesakeResolutionExtendMostSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeExtendMostSpecific")); //$NON-NLS-1$
@@ -73,7 +74,8 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_namesake_3_extend_specific", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_namesake_3_extend_specific", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -140,9 +142,9 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. We expect it to select the most specific one which is
- * here on the imported template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. We expect it to select the most specific one which
+ * is here on the imported template.
*/
public void testNamesakeResolutionImportMostSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeImportMostSpecific")); //$NON-NLS-1$
@@ -150,7 +152,8 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_namesake_3_import_specific", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_namesake_3_import_specific", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -165,9 +168,9 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * both its extended module and its imported module. We expect it to select the most specific one which is
- * here on the local template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on both its extended module and its imported module. We expect it to select the most specific one which
+ * is here on the local template.
*/
public void testNamesakeResolutionLocalMostSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeLocalMostSpecific")); //$NON-NLS-1$
@@ -175,7 +178,8 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_namesake_3_local_specific", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService
+ .doGenerate(module, "test_namesake_3_local_specific", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -190,8 +194,8 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its extended module. We expect it to select the most specific one which is here on the extended
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its extended module. We expect it to select the most specific one which is here on the extended
* template.
*/
public void testNamesakeResolutionOnExtendExtendSpecific() throws IOException {
@@ -216,8 +220,9 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its extended module. We expect it to select the most specific one which is here on the local template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its extended module. We expect it to select the most specific one which is here on the local
+ * template.
*/
public void testNamesakeResolutionOnExtendLocalSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeOnExtendLocalSpecific")); //$NON-NLS-1$
@@ -241,8 +246,8 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its imported module. We expect it to select the most specific one which is here on the imported
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its imported module. We expect it to select the most specific one which is here on the imported
* template.
*/
public void testNamesakeResolutionOnImportImportSpecific() throws IOException {
@@ -267,8 +272,9 @@ public class ParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its imported module. We expect it to select the most specific one which is here on the local template.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its imported module. We expect it to select the most specific one which is here on the local
+ * template.
*/
public void testNamesakeResolutionOnImportLocalSpecific() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeOnImportLocalSpecific")); //$NON-NLS-1$
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/SimpleNamesakeResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/SimpleNamesakeResolutionTest.java
index 0e40d07..cac8acd 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/SimpleNamesakeResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/namesake/SimpleNamesakeResolutionTest.java
@@ -15,26 +15,27 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
- * This will test the behavior of the Acceleo engine when resolving &quot;simple&quot; name conflicts in template
- * calls. These are considered simple conflicts since no overriding or changes in parameter count is present.
+ * This will test the behavior of the Acceleo engine when resolving &quot;simple&quot; name conflicts in
+ * template calls. These are considered simple conflicts since no overriding or changes in parameter count is
+ * present.
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
@@ -63,8 +64,8 @@ public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its extended module. We expect it to select the one present on the current module.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its extended module. We expect it to select the one present on the current module.
*/
public void testNameResolutionConflictOnExtended() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeExtendConflict")); //$NON-NLS-1$
@@ -87,8 +88,8 @@ public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * its imported module. We expect it to select the one present on the current module.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on its imported module. We expect it to select the one present on the current module.
*/
public void testNameResolutionConflictOnImported() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeImportConflict")); //$NON-NLS-1$
@@ -111,9 +112,9 @@ public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template not present ont the
- * current module but with namesakes on its extended and imported modules. We expect it to select the one
- * present on the extended module.
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template not present ont
+ * the current module but with namesakes on its extended and imported modules. We expect it to select the
+ * one present on the extended module.
*/
public void testNameResolutionExternalConflict() throws IOException {
generationRoot = new File(getGenerationRootPath("NamesakeExternalConflict")); //$NON-NLS-1$
@@ -146,7 +147,8 @@ public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_namesake_distinct_param_name", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_namesake_distinct_param_name", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -161,8 +163,8 @@ public class SimpleNamesakeResolutionTest extends AbstractAcceleoTest {
}
/**
- * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes on
- * each three possible places : extended, current and imported module. We expect it to select the one
+ * This will test the behavior of the Acceleo evaluation engine when resolving a template with namesakes
+ * on each three possible places : extended, current and imported module. We expect it to select the one
* present on the current module.
*/
public void testNameResolutionPriority() throws IOException {
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideGuardResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideGuardResolutionTest.java
index e2adaaf..cd8e817 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideGuardResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideGuardResolutionTest.java
@@ -15,14 +15,14 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
* This will test the behavior of the Acceleo engine when resolving overriding template calls. Overriding
@@ -33,8 +33,8 @@ import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
public class OverrideGuardResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideParameterTypeNarrowingResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideParameterTypeNarrowingResolutionTest.java
index 297c332..a599bdc 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideParameterTypeNarrowingResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/OverrideParameterTypeNarrowingResolutionTest.java
@@ -15,14 +15,14 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
* This will test the behavior of the Acceleo engine when resolving overriding template calls. Overriding
@@ -33,8 +33,8 @@ import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
public class OverrideParameterTypeNarrowingResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
@@ -72,7 +72,8 @@ public class OverrideParameterTypeNarrowingResolutionTest extends AbstractAccele
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_resolution_override_specific", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_resolution_override_specific", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -96,7 +97,8 @@ public class OverrideParameterTypeNarrowingResolutionTest extends AbstractAccele
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_resolution_local_override", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService
+ .doGenerate(module, "test_resolution_local_override", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -120,7 +122,8 @@ public class OverrideParameterTypeNarrowingResolutionTest extends AbstractAccele
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_resolution_external_override", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_resolution_external_override", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/SimpleOverridesResolutionTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/SimpleOverridesResolutionTest.java
index e6def7e..8d8a39e 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/SimpleOverridesResolutionTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/resolution/override/SimpleOverridesResolutionTest.java
@@ -15,26 +15,26 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.acceleo.model.mtl.Module;
import org.eclipse.acceleo.common.utils.ModelUtils;
import org.eclipse.acceleo.engine.service.AcceleoService;
import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
+import org.eclipse.acceleo.model.mtl.Module;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
/**
- * This will test the behavior of the Acceleo engine when resolving &quot;simple&quot; overriding template calls.
- * These are considered simple overrides since no parameter narrowing is done.
+ * This will test the behavior of the Acceleo engine when resolving &quot;simple&quot; overriding template
+ * calls. These are considered simple overrides since no parameter narrowing is done.
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
public class SimpleOverridesResolutionTest extends AbstractAcceleoTest {
{
try {
- final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID + '/'
- + "data/abstractClass.ecore", true); //$NON-NLS-1$
+ final URI inputModelURI = URI.createPlatformPluginURI('/' + AcceleoEngineTestPlugin.PLUGIN_ID
+ + '/' + "data/abstractClass.ecore", true); //$NON-NLS-1$
inputModel = ModelUtils.load(inputModelURI, resourceSet);
} catch (IOException e) {
fail("Error loading the input model."); //$NON-NLS-1$
@@ -72,7 +72,8 @@ public class SimpleOverridesResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_extend_overriden_direct_call", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_extend_overriden_direct_call", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -121,7 +122,8 @@ public class SimpleOverridesResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_local_overriden_direct_call", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_local_overriden_direct_call", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -145,8 +147,8 @@ public class SimpleOverridesResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService
- .doGenerate(module, "test_local_overriden_indirect_call", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_local_overriden_indirect_call", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
@@ -196,7 +198,8 @@ public class SimpleOverridesResolutionTest extends AbstractAcceleoTest {
cleanGenerationRoot();
- AcceleoService.doGenerate(module, "test_override_priority_indirect", inputModel, generationRoot, false); //$NON-NLS-1$
+ AcceleoService.doGenerate(module,
+ "test_override_priority_indirect", inputModel, generationRoot, false); //$NON-NLS-1$
try {
compareDirectories(referenceRoot, generationRoot);
} catch (IOException e) {
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/AcceleoEnginePluginTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/AcceleoEnginePluginTest.java
index 2c07db7..eefebae 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/AcceleoEnginePluginTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/AcceleoEnginePluginTest.java
@@ -16,14 +16,14 @@ import java.io.PrintStream;
import junit.framework.TestCase;
+import org.eclipse.acceleo.engine.AcceleoEngineMessages;
+import org.eclipse.acceleo.engine.AcceleoEnginePlugin;
+import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.acceleo.engine.AcceleoEngineMessages;
-import org.eclipse.acceleo.engine.AcceleoEnginePlugin;
-import org.eclipse.acceleo.engine.tests.AcceleoEngineTestPlugin;
/**
* Tests for the engine plug-in activator. Will mainly test behavior of utility methods it declares.
@@ -52,10 +52,11 @@ public class AcceleoEnginePluginTest extends TestCase {
private File temporaryLog;
/**
- * Tests the behavior of {@link AcceleoEnginePlugin#log(Exception, boolean)} passing an arbitrary exception
- * other than {@link NullPointerException} and {@link CoreException} to be logged. Expects the exception
- * to be logged with the specified severity. The error message should be the one specified in
- * org.eclipse.acceleo.engine.acceleoenginemessages.properties with key &quot;AcceleoEnginePlugin.JavaException&quot;.
+ * Tests the behavior of {@link AcceleoEnginePlugin#log(Exception, boolean)} passing an arbitrary
+ * exception other than {@link NullPointerException} and {@link CoreException} to be logged. Expects the
+ * exception to be logged with the specified severity. The error message should be the one specified in
+ * org.eclipse.acceleo.engine.acceleoenginemessages.properties with key
+ * &quot;AcceleoEnginePlugin.JavaException&quot;.
*/
public void testLogExceptionArbitraryException() {
boolean blocker = false;
@@ -66,7 +67,8 @@ public class AcceleoEnginePluginTest extends TestCase {
AcceleoEnginePlugin.log(new IllegalArgumentException(message), blocker);
System.setErr(systemErr);
- final String expectedMessage = AcceleoEngineMessages.getString("AcceleoEnginePlugin.JavaException");
+ final String expectedMessage = AcceleoEngineMessages
+ .getString("AcceleoEnginePlugin.JavaException");
final int expectedSeverity;
if (blocker) {
expectedSeverity = IStatus.ERROR;
@@ -85,8 +87,9 @@ public class AcceleoEnginePluginTest extends TestCase {
}
/**
- * Tests the behavior of {@link AcceleoEnginePlugin#log(Exception, boolean)} passing a {@link CoreException}
- * to be logged. Expects the exception to be logged with the specified error message and severity.
+ * Tests the behavior of {@link AcceleoEnginePlugin#log(Exception, boolean)} passing a
+ * {@link CoreException} to be logged. Expects the exception to be logged with the specified error message
+ * and severity.
*/
public void testLogExceptionCoreException() {
for (int severity : ERROR_SEVERITIES) {
@@ -138,7 +141,8 @@ public class AcceleoEnginePluginTest extends TestCase {
AcceleoEnginePlugin.log(new NullPointerException(message), blocker);
System.setErr(systemErr);
- final String expectedMessage = AcceleoEngineMessages.getString("AcceleoEnginePlugin.ElementNotFound");
+ final String expectedMessage = AcceleoEngineMessages
+ .getString("AcceleoEnginePlugin.ElementNotFound");
final int expectedSeverity;
if (blocker) {
expectedSeverity = IStatus.ERROR;
@@ -171,7 +175,8 @@ public class AcceleoEnginePluginTest extends TestCase {
AcceleoEnginePlugin.log((String)null, blocker);
System.setErr(systemErr);
- final String expectedMessage = AcceleoEngineMessages.getString("AcceleoEnginePlugin.UnexpectedException");
+ final String expectedMessage = AcceleoEngineMessages
+ .getString("AcceleoEnginePlugin.UnexpectedException");
final int expectedSeverity;
if (blocker) {
expectedSeverity = IStatus.ERROR;
@@ -190,8 +195,8 @@ public class AcceleoEnginePluginTest extends TestCase {
}
/**
- * Tests the behavior of {@link AcceleoEnginePlugin#log(String, boolean)} with a valid message to be logged.
- * Expects a new entry to be logged with the given severity and message.
+ * Tests the behavior of {@link AcceleoEnginePlugin#log(String, boolean)} with a valid message to be
+ * logged. Expects a new entry to be logged with the given severity and message.
*/
public void testLogMessageValidMessage() {
boolean blocker = false;
@@ -219,8 +224,8 @@ public class AcceleoEnginePluginTest extends TestCase {
}
/**
- * Tests the behavior of {@link AcceleoEnginePlugin#log(IStatus)} with <code>null</code> as the status to be
- * logged. Expects a {@link NullPointerException} to be thrown with the given status' error message.
+ * Tests the behavior of {@link AcceleoEnginePlugin#log(IStatus)} with <code>null</code> as the status to
+ * be logged. Expects a {@link NullPointerException} to be thrown with the given status' error message.
*/
public void testLogStatusNullStatus() {
try {
@@ -232,8 +237,8 @@ public class AcceleoEnginePluginTest extends TestCase {
}
/**
- * Tests the behavior of {@link AcceleoEnginePlugin#log(IStatus)} with a valid status to be logged. Expects
- * the status to be logged with the specified severity, error message and source plugin.
+ * Tests the behavior of {@link AcceleoEnginePlugin#log(IStatus)} with a valid status to be logged.
+ * Expects the status to be logged with the specified severity, error message and source plugin.
*/
public void testLogStatusValidStatus() {
for (int severity : ERROR_SEVERITIES) {
@@ -249,8 +254,8 @@ public class AcceleoEnginePluginTest extends TestCase {
.getMessage());
assertEquals("Unexpected severity of the logged exception.", severity, loggedStatus
.getSeverity());
- assertEquals("Exception logged with unexpected plug-in ID.", AcceleoEngineTestPlugin.PLUGIN_ID,
- loggedStatus.getPlugin());
+ assertEquals("Exception logged with unexpected plug-in ID.",
+ AcceleoEngineTestPlugin.PLUGIN_ID, loggedStatus.getPlugin());
}
}
}
diff --git a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/MessagesTest.java b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/MessagesTest.java
index 2f16193..30957f7 100644
--- a/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/MessagesTest.java
+++ b/tests/org.eclipse.acceleo.engine.tests/src/org/eclipse/acceleo/engine/tests/unit/utils/MessagesTest.java
@@ -37,22 +37,30 @@ public class MessagesTest extends TestCase {
"Arguments of a generation cannot be null.",};
/** These will be used when testing message retrieval with invalid keys. */
- private final String[] invalidKeys = {"invalidKey", "AcceleoEvaluationContext.CleanUpError1", "", "\u00ec",};
+ private final String[] invalidKeys = {"invalidKey", "AcceleoEvaluationContext.CleanUpError1", "",
+ "\u00ec",};
/** Contains possible parameters for the messages. */
private final Object[] messageParameters = {null, "", "Foehn", -1, new Long(10), '\u0043', new HashSet(),
"0x6c9a.^\\/",};
- /** These two are valid, parameterisable keys. See org.eclipse.acceleo.engine.acceleoenginemessages.properties. */
+ /**
+ * These two are valid, parameterisable keys. See
+ * org.eclipse.acceleo.engine.acceleoenginemessages.properties.
+ */
private final String[] parameterisableKeys = {"AcceleoEvaluationEnvironment.UndefinedOperation",
"AcceleoEvaluationContext.LostContent", "AcceleoService.UndefinedTemplate",};
- /** These are valid, un-parameterisable keys. See org.eclipse.acceleo.engine.acceleoenginemessages.properties. */
+ /**
+ * These are valid, un-parameterisable keys. See
+ * org.eclipse.acceleo.engine.acceleoenginemessages.properties.
+ */
private final String[] validKeys = {"usercode.start", "AcceleoEvaluationVisitor.NullForIteration",
"AcceleoEngine.IllegalTemplateInvocation", "AcceleoService.NullArguments",};
/**
- * Tests {@link AcceleoEngineMessages#getString(String, Object...)} with an invalid key. Expects the String
+ * Tests {@link AcceleoEngineMessages#getString(String, Object...)} with an invalid key. Expects the
+ * String
*
* <pre>
* &quot;!&quot; + key + &quot;!&quot;
@@ -121,7 +129,8 @@ public class MessagesTest extends TestCase {
}
Locale.setDefault(Locale.ENGLISH);
assertEquals("Unexpected formatted String returned by getString(String, Object...).",
- expectedResult, AcceleoEngineMessages.getString(parameterisableKeys[k], parameters));
+ expectedResult, AcceleoEngineMessages.getString(parameterisableKeys[k],
+ parameters));
if (previousLocale != null) {
Locale.setDefault(previousLocale);
} else {
@@ -148,8 +157,8 @@ public class MessagesTest extends TestCase {
}
/**
- * Tests {@link AcceleoEngineMessages#getString(String, Object...)} with valid keys and <code>null</code> as
- * formatting parameter. Expects the result to be the same as the
+ * Tests {@link AcceleoEngineMessages#getString(String, Object...)} with valid keys and <code>null</code>
+ * as formatting parameter. Expects the result to be the same as the
* {@link AcceleoEngineMessages#getString(String)}.
*/
public void testFormattedGetStringValidKeyNullParameter() {
@@ -190,8 +199,8 @@ public class MessagesTest extends TestCase {
}
/**
- * Tests {@link AcceleoEngineMessages#getString(String)} with valid keys. Expects the String associated to the
- * key in the properties file to be returned.
+ * Tests {@link AcceleoEngineMessages#getString(String)} with valid keys. Expects the String associated to
+ * the key in the properties file to be returned.
*/
public void testUnFormattedGetStringValidKey() {
for (int i = 0; i < validKeys.length; i++) {