diff options
author | Laurent Goubet | 2014-01-30 10:18:27 +0000 |
---|---|---|
committer | Laurent Goubet | 2014-01-30 15:43:15 +0000 |
commit | 578f5e206473a3a4286246648b969282bf0a1029 (patch) | |
tree | c42e21f7d395e3b90c56264e234424ad19c26d20 /plugins/org.eclipse.emf.compare.tests/src | |
parent | f6f92566be706f641c0afade7e3ab3dd752927cd (diff) | |
download | org.eclipse.emf.compare-578f5e206473a3a4286246648b969282bf0a1029.tar.gz org.eclipse.emf.compare-578f5e206473a3a4286246648b969282bf0a1029.tar.xz org.eclipse.emf.compare-578f5e206473a3a4286246648b969282bf0a1029.zip |
Cleanup for version bumping
- Bump versions to reflect minimal BREE change
- Fix as many warnings as possible
- Make sure our @since reflect the correct versions
Change-Id: Ifb30b655f17ef2420ea5ca69c528910bd51e7649
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src')
30 files changed, 115 insertions, 138 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/AbstractTestCompareCommandStack.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/AbstractTestCompareCommandStack.java index 7de3334f8..15a3813e2 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/AbstractTestCompareCommandStack.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/AbstractTestCompareCommandStack.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -31,16 +31,12 @@ public abstract class AbstractTestCompareCommandStack { private MockCompareCommand leftToRight3;
- private MockCompareCommand leftToRight4;
-
private MockCompareCommand rightToLeft1;
private MockCompareCommand rightToLeft2;
private MockCompareCommand rightToLeft3;
- private MockCompareCommand rightToLeft4;
-
@Before
public void before() {
commandStack = createCommandStack();
@@ -48,12 +44,10 @@ public abstract class AbstractTestCompareCommandStack { leftToRight1 = new MockCompareCommand(true);
leftToRight2 = new MockCompareCommand(true);
leftToRight3 = new MockCompareCommand(true);
- leftToRight4 = new MockCompareCommand(true);
rightToLeft1 = new MockCompareCommand(false);
rightToLeft2 = new MockCompareCommand(false);
rightToLeft3 = new MockCompareCommand(false);
- rightToLeft4 = new MockCompareCommand(false);
}
/**
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareSideCommandStack.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareSideCommandStack.java index 251106a92..951bbe9ae 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareSideCommandStack.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareSideCommandStack.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -31,15 +31,12 @@ public class TestCompareSideCommandStack { private MockCompareCommand leftToRight3;
- private MockCompareCommand leftToRight4;
-
@Before
public void before() {
commandStack = new CompareSideCommandStack();
leftToRight1 = new MockCompareCommand(true);
leftToRight2 = new MockCompareCommand(true);
leftToRight3 = new MockCompareCommand(true);
- leftToRight4 = new MockCompareCommand(true);
}
@Test
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java index 59e7d603b..ce82aa58e 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -11,10 +11,6 @@ package org.eclipse.emf.compare.tests.conflict;
import static com.google.common.base.Predicates.and;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToAttribute;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
@@ -27,6 +23,10 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.movedInReferenc import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromAttribute;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java index 19feebab1..ca7cbc688 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2013 Obeo.
+ * Copyright (c) 2013, 2014 Obeo.
* 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
@@ -10,8 +10,8 @@ */
package org.eclipse.emf.compare.tests.diff;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Lists;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java index a1947ce21..b172370df 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EcorePackage;
import org.junit.Test;
+@SuppressWarnings("nls")
public class URIDistanceTest {
private URIDistance meter = new URIDistance();
@@ -141,14 +142,16 @@ public class URIDistanceTest { } else {
CharMatcher slash = CharMatcher.is('/');
Splitter splitter = Splitter.on('/');
- if (slash.indexIn(aPath) == 0) {
- aPath = aPath.substring(1);
+ String actualAPath = aPath;
+ String actualBPath = bPath;
+ if (slash.indexIn(actualAPath) == 0) {
+ actualAPath = aPath.substring(1);
}
- if (slash.indexIn(bPath) == 0) {
- bPath = bPath.substring(1);
+ if (slash.indexIn(actualBPath) == 0) {
+ actualBPath = bPath.substring(1);
}
- Iterable<String> aString = splitter.split(slash.trimTrailingFrom(aPath));
- Iterable<String> bString = splitter.split(slash.trimTrailingFrom(bPath));
+ Iterable<String> aString = splitter.split(slash.trimTrailingFrom(actualAPath));
+ Iterable<String> bString = splitter.split(slash.trimTrailingFrom(actualBPath));
return meter.proximity(ImmutableList.copyOf(aString), ImmutableList.copyOf(bString));
}
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java index 7d071d95f..42c4bafee 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Obeo. + * Copyright (c) 2012, 2014 Obeo. * 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 @@ -16,6 +16,7 @@ import org.eclipse.emf.compare.tests.edit.data.ResourceScopeProvider; import org.eclipse.emf.compare.tests.framework.AbstractInputData; import org.eclipse.emf.ecore.resource.Resource; +@SuppressWarnings("nls") public class EcoreA1InputData extends AbstractInputData implements ResourceScopeProvider { public Resource getLeft() throws IOException { diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java index b8e547844..f4f539bac 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,11 +10,11 @@ *******************************************************************************/
package org.eclipse.emf.compare.tests.equi;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertSame;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java index a7cefcf62..b1d9152f3 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,11 +10,11 @@ */
package org.eclipse.emf.compare.tests.fragmentation;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Iterators;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java index 85cf3f750..132870db2 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -67,8 +67,6 @@ public abstract class AbstractInputData { * Thrown if we could not access either this class' resource, or the file towards which
* <code>path</code> points.
*/
- // Suppressing the warning until bug 376938 is fixed
- @SuppressWarnings("resource")
protected Resource loadFromClassLoader(String path, ResourceSet resourceSet) throws IOException {
final URL fileURL = getClass().getResource(path);
final URI uri = URI.createURI(fileURL.toString());
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java index d9cc0962c..b9d0736d4 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -11,9 +11,6 @@ package org.eclipse.emf.compare.tests.framework;
import static com.google.common.base.Predicates.and;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedAttribute;
@@ -21,6 +18,9 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReferenc import static org.eclipse.emf.compare.utils.EMFComparePredicates.fromSide;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/IdentifierMatchValidator.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/IdentifierMatchValidator.java index dfb33678a..48fda31d2 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/IdentifierMatchValidator.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/IdentifierMatchValidator.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,8 +10,8 @@ */
package org.eclipse.emf.compare.tests.framework;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import com.google.common.collect.Maps;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/EMFCompareTestRunner.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/EMFCompareTestRunner.java index cc0e42c4f..8c4d59edf 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/EMFCompareTestRunner.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/EMFCompareTestRunner.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2011, 2012 Obeo.
+ * Copyright (c) 2011, 2014 Obeo.
* 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
@@ -13,10 +13,9 @@ package org.eclipse.emf.compare.tests.framework.junit; import java.util.ArrayList;
import java.util.List;
-import junit.framework.Assert;
-
import org.eclipse.emf.compare.tests.framework.junit.annotation.UseCase;
import org.eclipse.emf.compare.tests.framework.junit.internal.UseCaseRunner;
+import org.junit.Assert;
import org.junit.runner.Description;
import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java index 70023cd7f..e80c4a62b 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2011, 2012 Obeo.
+ * Copyright (c) 2011, 2014 Obeo.
* 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
@@ -14,14 +14,13 @@ import com.google.common.collect.Lists; import java.util.List;
-import junit.framework.Assert;
-
import org.eclipse.emf.compare.tests.framework.NotifierTuple;
import org.eclipse.emf.compare.tests.framework.junit.annotation.BeforeMatch;
import org.eclipse.emf.compare.tests.framework.junit.annotation.ConflictTest;
import org.eclipse.emf.compare.tests.framework.junit.annotation.DiffTest;
import org.eclipse.emf.compare.tests.framework.junit.annotation.MatchTest;
import org.eclipse.emf.compare.tests.framework.junit.annotation.UseCase;
+import org.junit.Assert;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseStatement.java index f6d867027..bede48da4 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseStatement.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseStatement.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,10 +10,9 @@ */
package org.eclipse.emf.compare.tests.framework.junit.internal;
-import junit.framework.Assert;
-
import org.eclipse.emf.compare.tests.framework.NotifierTuple;
import org.eclipse.emf.compare.tests.framework.junit.annotation.UseCase;
+import org.junit.Assert;
import org.junit.runners.model.FrameworkMethod;
/**
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java index a76565d2a..03885529d 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2012 Obeo. + * Copyright (c) 2012, 2014 Obeo. * 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 @@ -39,13 +39,12 @@ import org.junit.runner.RunWith; * * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a> */ +@SuppressWarnings("nls") @RunWith(Theories.class) public class DistanceAxiomsTests { private DistanceFunction meter; - private int MAX_DISTANCE = Integer.MAX_VALUE; - private Comparison comparison; @Before @@ -63,7 +62,7 @@ public class DistanceAxiomsTests { Assume.assumeTrue(a.eClass() == b.eClass()); double aTob = meter.distance(comparison, a, b); double bToa = meter.distance(comparison, b, a); - assertEquals(aTob, bToa); + assertEquals(aTob, bToa, 0.01); } private static EObject[] createFingerPrintsFromModel(EObject einstance) { @@ -72,7 +71,7 @@ public class DistanceAxiomsTests { @Theory public void separation(EObject a) { - assertEquals(0, meter.distance(comparison, a, a)); + assertEquals(0, meter.distance(comparison, a, a), 0.01); } @Theory diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java index 7cd82148c..bee74c41e 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2012 Obeo. + * Copyright (c) 2012, 2014 Obeo. * 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 @@ -11,14 +11,14 @@ package org.eclipse.emf.compare.tests.fullcomparison; import static com.google.common.base.Predicates.and; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertSame; -import static junit.framework.Assert.assertTrue; import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference; import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedAttribute; import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference; import static org.eclipse.emf.compare.utils.EMFComparePredicates.fromSide; import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; import com.google.common.base.Predicate; import com.google.common.collect.Iterators; diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java index 73b9b3fa0..30e90a56d 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,10 +10,6 @@ */
package org.eclipse.emf.compare.tests.fullcomparison;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertAdded;
import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertAddedToReference;
import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertAllMatched;
@@ -21,6 +17,10 @@ import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertCha import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertChangedReference;
import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertRemoved;
import static org.eclipse.emf.compare.tests.framework.EMFCompareAssert.assertRemovedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Lists;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java index b238307dc..e2efa3ca4 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -28,7 +28,6 @@ import org.eclipse.emf.compare.tests.suite.AllTests; import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl;
import org.junit.Before;
import org.junit.Test;
@@ -49,13 +48,14 @@ public class MatchPerformanceComparisonTest { Resource origin;
+ @SuppressWarnings("restriction")
@Before
public void setUp() throws Exception {
AllTests.fillEMFRegistries();
EPackage.Registry.INSTANCE.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("uml", //$NON-NLS-1$
- new UMLResourceFactoryImpl());
+ new org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl());
left = data.getNominalUMLLeft();
right = data.getNominalUMLRight();
origin = data.getNominalUMLOrigin();
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java index 5a7c8ff4f..8744ddf50 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2012 Obeo. + * Copyright (c) 2012, 2014 Obeo. * 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 @@ -10,16 +10,14 @@ */ package org.eclipse.emf.compare.tests.fullcomparison; -import static junit.framework.Assert.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.util.Iterator; import java.util.List; @@ -141,11 +139,6 @@ public class ProximityComparisonTest extends EMFCompareTestBase { Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry) .build().compare(scope); EMFComparePrettyPrinter.printComparison(result, System.out); - final List<Diff> differences = result.getDifferences(); - // EMFCompareAssert.assertAddedToReference(differences, "p1.p2", "eSubpackages", "p1.p2.subPackage", - // DifferenceSource.LEFT); - // EMFCompareAssert.assertRemovedFromReference(differences, "p1", "eSubpackages", "p1.another", - // DifferenceSource.LEFT); assertEquals("We are supposed to have zero diffs", 2, result.getDifferences().size()); } @@ -189,7 +182,6 @@ public class ProximityComparisonTest extends EMFCompareTestBase { Iterator<ResourceAttachmentChange> attrChanges = Iterators.filter(result.getDifferences().iterator(), ResourceAttachmentChange.class); assertTrue("We are supposed to detect a new attachment to a resource", attrChanges.hasNext()); - } @Test @@ -214,13 +206,6 @@ public class ProximityComparisonTest extends EMFCompareTestBase { } - private String print(Comparison result) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos); - EMFComparePrettyPrinter.printDifferences(result, ps); - return baos.toString(); - } - private void assertAllMatched(Iterable<? extends EObject> eObjects, Comparison comparison) { for (EObject eObject : eObjects) { final Match match = comparison.getMatch(eObject); diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/DistanceMatchInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/DistanceMatchInputData.java index f3bdeb28c..9befeca51 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/DistanceMatchInputData.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/DistanceMatchInputData.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -15,6 +15,7 @@ import java.io.IOException; import org.eclipse.emf.compare.tests.framework.AbstractInputData;
import org.eclipse.emf.ecore.resource.Resource;
+@SuppressWarnings("nls")
public class DistanceMatchInputData extends AbstractInputData {
public Resource getCompareLeft() throws IOException {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/dynamic/DynamicInstancesInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/dynamic/DynamicInstancesInputData.java index 15b2182c7..2d9e579db 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/dynamic/DynamicInstancesInputData.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/dynamic/DynamicInstancesInputData.java @@ -1,5 +1,5 @@ /**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+@SuppressWarnings({"nls", "unchecked", })
public class DynamicInstancesInputData extends AbstractInputData {
private EPackage pak;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/MatchEngineFactoryRegistryTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/MatchEngineFactoryRegistryTest.java index 4d2e5ef1c..703d30116 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/MatchEngineFactoryRegistryTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/MatchEngineFactoryRegistryTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Obeo. + * Copyright (c) 2013, 2014 Obeo. * 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 @@ -10,9 +10,9 @@ *******************************************************************************/ package org.eclipse.emf.compare.tests.match; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.IOException; diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java index 8fcebb08b..1628d676e 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Obeo. + * Copyright (c) 2013, 2014 Obeo. * 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 @@ -30,6 +30,7 @@ import org.junit.Test; * * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a> */ +@SuppressWarnings("nls") public class ProximityIndexTest { @Test diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java index 750ebfcf6..76cad4282 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -11,12 +11,12 @@ package org.eclipse.emf.compare.tests.merge;
import static com.google.common.base.Predicates.and;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedAttribute;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.fromSide;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Iterators;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java index 93ad35bca..fb653cbe2 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,12 +10,12 @@ *******************************************************************************/
package org.eclipse.emf.compare.tests.merge;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Iterator;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java index ac7ddd79c..d73baba3b 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -11,12 +11,6 @@ package org.eclipse.emf.compare.tests.merge;
import static com.google.common.base.Predicates.and;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToAttribute;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedAttribute;
@@ -26,6 +20,12 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.movedInAttribut import static org.eclipse.emf.compare.utils.EMFComparePredicates.movedInReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromAttribute;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Iterators;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java index 539b01612..9a67eab3a 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -11,11 +11,6 @@ package org.eclipse.emf.compare.tests.merge;
import static com.google.common.base.Predicates.and;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
@@ -23,6 +18,11 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.fromSide; import static org.eclipse.emf.compare.utils.EMFComparePredicates.moved;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterators;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java index 790c17bf5..5a080404a 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Obeo. + * Copyright (c) 2012, 2014 Obeo. * 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 @@ -10,8 +10,8 @@ *******************************************************************************/ package org.eclipse.emf.compare.tests.postprocess; -import static junit.framework.Assert.assertSame; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import java.io.IOException; @@ -203,7 +203,7 @@ public class PostProcessorTest { final Resource right = input.getRight(); final IComparisonScope scope = new DefaultComparisonScope(left, right, null); - PostProcessorDescriptorRegistryImpl registry = new PostProcessorDescriptorRegistryImpl(); + PostProcessorDescriptorRegistryImpl<String> registry = new PostProcessorDescriptorRegistryImpl<String>(); registry.put(TestPostProcessor1.class.getName(), new TestPostProcessorDescriptor(Pattern.compile(""), null, new TestPostProcessor1(), 1)); registry.put(TestPostProcessor2.class.getName(), new TestPostProcessorDescriptor(Pattern @@ -230,7 +230,7 @@ public class PostProcessorTest { private Comparison compareWithPostProcessing(Resource left, Resource right, Pattern nsURI, Pattern resourceURI) { - PostProcessorDescriptorRegistryImpl registry = new PostProcessorDescriptorRegistryImpl(); + PostProcessorDescriptorRegistryImpl<String> registry = new PostProcessorDescriptorRegistryImpl<String>(); registry.put(TestPostProcessor.class.getName(), new TestPostProcessorDescriptor(nsURI, resourceURI, new TestPostProcessor(), 10)); diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java index 51cd59067..2115d0f57 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -12,14 +12,14 @@ package org.eclipse.emf.compare.tests.req; import static com.google.common.collect.Iterables.filter;
import static com.google.common.collect.Iterables.getOnlyElement;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertSame;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.movedInReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -624,7 +624,7 @@ public class ReqComputingTest { EList<Diff> differences = comparison.getDifferences();
- assertSame(3, differences.size());
+ assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
Diff added1 = getOnlyElement(filter(differences, added(node1)), null);
assertNotNull(added1);
Diff added2 = getOnlyElement(filter(differences, added(node2)), null);
@@ -641,10 +641,10 @@ public class ReqComputingTest { // Happy compiler
assert singleChange != null;
assertTrue(singleChange.getValue().eIsProxy());
- assertSame(0, added1.getRequires().size());
- assertSame(1, added2.getRequires().size());
+ assertSame(Integer.valueOf(0), Integer.valueOf(added1.getRequires().size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(added2.getRequires().size()));
assertTrue(added2.getRequires().contains(added1));
- assertSame(1, singleChange.getRequires().size());
+ assertSame(Integer.valueOf(1), Integer.valueOf(singleChange.getRequires().size()));
assertTrue(singleChange.getRequires().contains(added2));
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java index 1b3349bb7..2cf2cc0cf 100644 --- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java +++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2012, 2014 Obeo.
* 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
@@ -10,11 +10,11 @@ *******************************************************************************/
package org.eclipse.emf.compare.tests.scope;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
|