Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2014-08-13 09:32:28 -0400
committerMikaël Barbero2014-08-13 09:32:28 -0400
commit30312850b57033ab31ab16f4b37ec115af51a4cc (patch)
treeb3b94bb0db4edb086e02e79b7b9a1cd0e754615f /plugins/org.eclipse.emf.compare.uml2.tests
parentdf46467b8b0106768da96f4190f6de12b322765c (diff)
downloadorg.eclipse.emf.compare-30312850b57033ab31ab16f4b37ec115af51a4cc.tar.gz
org.eclipse.emf.compare-30312850b57033ab31ab16f4b37ec115af51a4cc.tar.xz
org.eclipse.emf.compare-30312850b57033ab31ab16f4b37ec115af51a4cc.zip
Do not use assertSame for int comparison (2)
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java7
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java21
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java21
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java33
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java19
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java9
24 files changed, 91 insertions, 170 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
index e9402401b..38f732b5a 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
@@ -162,14 +162,14 @@ public abstract class AbstractUMLTest {
ADD, DELETE;
}
- protected static Integer count(List<Diff> differences, Predicate<Object> p) {
+ protected static int count(List<Diff> differences, Predicate<Object> p) {
int count = 0;
final Iterator<Diff> result = Iterators.filter(differences.iterator(), p);
while (result.hasNext()) {
count++;
result.next();
}
- return Integer.valueOf(count);
+ return count;
}
public static Predicate<? super Diff> onRealFeature(final EStructuralFeature feature) {
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
index 594d8397f..86f526663 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java
@@ -12,7 +12,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -239,7 +238,7 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertNotNull(addUnlimitedNaturalInClass0);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(AssociationChange.class)));
+ assertEquals(1, count(differences, instanceOf(AssociationChange.class)));
Diff addUMLAssociation = null;
if (kind.equals(TestKind.ADD)) {
addUMLAssociation = Iterators.find(differences.iterator(), and(
@@ -272,21 +271,18 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertEquals(0, addPropertyClass0.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addPropertyClass0InAssociation.getRequires()
- .size()));
+ assertEquals(2, addPropertyClass0InAssociation.getRequires().size());
assertTrue(addPropertyClass0InAssociation.getRequires().contains(addPropertyClass0));
assertTrue(addPropertyClass0InAssociation.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass1.getRequires().size());
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addPropertyClass1));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass0.getRequires().size());
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addPropertyClass0));
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addAssociation));
@@ -322,11 +318,9 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertTrue(addPropertyClass0.getRequires().contains(addRefTypeInPropertyClass0));
assertTrue(addPropertyClass0.getRequires().contains(addPropertyClass0InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass1.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass0.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass0.getRequires().size());
assertEquals(5, addAssociation.getRequires().size());
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
index 48b64e7f6..14a602e09 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java
@@ -12,7 +12,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -241,7 +240,7 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertNotNull(addPropertyClass0InAssociation);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(AssociationChange.class)));
+ assertEquals(1, count(differences, instanceOf(AssociationChange.class)));
Diff addUMLAssociation = null;
if (kind.equals(TestKind.ADD)) {
addUMLAssociation = Iterators.find(differences.iterator(), and(
@@ -273,21 +272,18 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertEquals(0, addPropertyClass1.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addPropertyClass1InAssociation.getRequires()
- .size()));
+ assertEquals(2, addPropertyClass1InAssociation.getRequires().size());
assertTrue(addPropertyClass1InAssociation.getRequires().contains(addPropertyClass1));
assertTrue(addPropertyClass1InAssociation.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass1.getRequires().size());
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addPropertyClass1));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass0.getRequires().size());
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addPropertyClass0));
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addAssociation));
@@ -323,11 +319,9 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertTrue(addPropertyClass0.getRequires().contains(addRefTypeInPropertyClass0));
assertTrue(addPropertyClass0.getRequires().contains(addPropertyClass0InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass1.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass0.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass0.getRequires().size());
assertEquals(5, addAssociation.getRequires().size());
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
index 76ebb4fd2..ec9d7bcd1 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java
@@ -12,7 +12,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -259,7 +258,7 @@ public class AddAssociationTest extends AbstractUMLTest {
assertNotNull(addOwnedEndClass2InAssociation);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(AssociationChange.class)));
+ assertEquals(1, count(differences, instanceOf(AssociationChange.class)));
Diff addUMLAssociation = null;
if (kind.equals(TestKind.ADD)) {
addUMLAssociation = Iterators.find(differences.iterator(), and(
@@ -288,8 +287,7 @@ public class AddAssociationTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass1.getRequires().size());
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(
addOwnedEndClass1InAssociation));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
@@ -297,8 +295,7 @@ public class AddAssociationTest extends AbstractUMLTest {
assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addOwnedEndClass1InAssociation));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
- .size()));
+ assertEquals(2, addRefAssociationInPropertyClass2.getRequires().size());
assertTrue(addRefAssociationInPropertyClass2.getRequires().contains(
addOwnedEndClass2InAssociation));
assertTrue(addRefAssociationInPropertyClass2.getRequires().contains(addAssociation));
@@ -309,14 +306,12 @@ public class AddAssociationTest extends AbstractUMLTest {
assertEquals(0, addAssociation.getRequires().size());
assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addNavigableOwnedEndClass1InAssociation
- .getRequires().size()));
+ assertEquals(2, addNavigableOwnedEndClass1InAssociation.getRequires().size());
assertTrue(addNavigableOwnedEndClass1InAssociation.getRequires().contains(addAssociation));
assertTrue(addNavigableOwnedEndClass1InAssociation.getRequires().contains(
addOwnedEndClass1InAssociation));
- assertSame(Integer.valueOf(2), Integer.valueOf(addNavigableOwnedEndClass2InAssociation
- .getRequires().size()));
+ assertEquals(2, addNavigableOwnedEndClass2InAssociation.getRequires().size());
assertTrue(addNavigableOwnedEndClass2InAssociation.getRequires().contains(addAssociation));
assertTrue(addNavigableOwnedEndClass2InAssociation.getRequires().contains(
addOwnedEndClass2InAssociation));
@@ -333,17 +328,13 @@ public class AddAssociationTest extends AbstractUMLTest {
assertEquals(1, addUnlimitedNaturalInClass2.getRequires().size());
assertTrue(addUnlimitedNaturalInClass2.getRequires().contains(addOwnedEndClass2InAssociation));
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addNavigableOwnedEndClass1InAssociation
- .getRequires().size()));
+ assertEquals(0, addNavigableOwnedEndClass1InAssociation.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addNavigableOwnedEndClass2InAssociation
- .getRequires().size()));
+ assertEquals(0, addNavigableOwnedEndClass2InAssociation.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass1.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass2.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass2.getRequires().size());
assertEquals(8, addAssociation.getRequires().size());
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
index 61487e7b6..1d9f7ca9a 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java
@@ -11,7 +11,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -193,7 +192,7 @@ public class ChangeAssociationTest extends AbstractUMLTest {
// CHECK EXTENSION
// No extension anymore
- assertSame(Integer.valueOf(0), count(differences, instanceOf(AssociationChange.class)));
+ assertEquals(0, count(differences, instanceOf(AssociationChange.class)));
Diff changeUMLAssociation = Iterators.find(differences.iterator(), and(
instanceOf(AssociationChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLAssociation);
@@ -209,8 +208,7 @@ public class ChangeAssociationTest extends AbstractUMLTest {
if (kind.equals(TestKind.ADD)) {
assertEquals(0, addPropertyClass2.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
- .size()));
+ assertEquals(1, addRefAssociationInPropertyClass2.getRequires().size());
assertTrue(addRefAssociationInPropertyClass2.getRequires().contains(addPropertyClass2));
assertEquals(1, addRefTypeInPropertyClass2.getRequires().size());
@@ -231,8 +229,7 @@ public class ChangeAssociationTest extends AbstractUMLTest {
assertTrue(addPropertyClass2.getRequires().contains(addRefTypeInPropertyClass2));
assertTrue(addPropertyClass2.getRequires().contains(addPropertyClass2InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
- .size()));
+ assertEquals(0, addRefAssociationInPropertyClass2.getRequires().size());
assertEquals(0, addRefTypeInPropertyClass2.getRequires().size());
// assertEquals(0, changeUMLAssociation.getRequires().size());
assertEquals(0, addLiteralIntegerInClass2.getRequires().size());
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
index 8cbb8d74a..a5ed18fb7 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java
@@ -10,7 +10,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -119,7 +118,7 @@ public class AddAbstractionTest extends AbstractUMLTest {
assertNotNull(addRefClass0InAbstraction);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
index 3582711b7..32b945eee 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java
@@ -10,7 +10,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -118,7 +117,7 @@ public class AddDependencyTest extends AbstractUMLTest {
assertNotNull(addRefClass1InDependency);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
@@ -162,8 +161,8 @@ public class AddDependencyTest extends AbstractUMLTest {
// Was not null with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
assertNull(addRefClass0InDependency.getEquivalence());
- // assertSame(Integer.valueOf(2), Integer.valueOf(addRefClass0InDependency.getEquivalence()
- // .getDifferences().size()));
+ // assertEquals(2, addRefClass0InDependency.getEquivalence()
+ // .getDifferences().size());
testIntersections(comparison);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
index c189cc3ae..6a6115c7f 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java
@@ -9,7 +9,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -130,7 +129,7 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
assertNotNull(addContractInInterfaceRealization);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
@@ -148,25 +147,19 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addClientInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addClientInInterfaceRealization.getRequires().size());
assertTrue(addClientInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(1), Integer.valueOf(addSupplierInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addSupplierInInterfaceRealization.getRequires().size());
assertTrue(addSupplierInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(1), Integer.valueOf(addContractInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addContractInInterfaceRealization.getRequires().size());
assertTrue(addContractInInterfaceRealization.getRequires().contains(addInterfaceRealization));
assertEquals(0, addInterfaceRealization.getRequires().size());
assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addClientInInterfaceRealization.getRequires()
- .size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addSupplierInInterfaceRealization.getRequires()
- .size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(0, addClientInInterfaceRealization.getRequires().size());
+ assertEquals(0, addSupplierInInterfaceRealization.getRequires().size());
+ assertEquals(0, addContractInInterfaceRealization.getRequires().size());
assertEquals(3, addInterfaceRealization.getRequires().size());
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
index 6b3e620b9..cf5188ef5 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java
@@ -10,7 +10,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -119,7 +118,7 @@ public class AddRealizationTest extends AbstractUMLTest {
assertNotNull(addRefClass1InDependency);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
index 88fa29d28..025cbc7c9 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java
@@ -9,7 +9,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -130,7 +129,7 @@ public class AddSubstitutionTest extends AbstractUMLTest {
assertNotNull(addContractInInterfaceRealization);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
@@ -148,25 +147,19 @@ public class AddSubstitutionTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addClientInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addClientInInterfaceRealization.getRequires().size());
assertTrue(addClientInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(1), Integer.valueOf(addSupplierInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addSupplierInInterfaceRealization.getRequires().size());
assertTrue(addSupplierInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(1), Integer.valueOf(addContractInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(1, addContractInInterfaceRealization.getRequires().size());
assertTrue(addContractInInterfaceRealization.getRequires().contains(addInterfaceRealization));
assertEquals(0, addInterfaceRealization.getRequires().size());
assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addClientInInterfaceRealization.getRequires()
- .size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addSupplierInInterfaceRealization.getRequires()
- .size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
- .size()));
+ assertEquals(0, addClientInInterfaceRealization.getRequires().size());
+ assertEquals(0, addSupplierInInterfaceRealization.getRequires().size());
+ assertEquals(0, addContractInInterfaceRealization.getRequires().size());
assertEquals(3, addInterfaceRealization.getRequires().size());
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
index 7ed45c77b..89c0bb045 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java
@@ -10,7 +10,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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.base.Predicate;
@@ -117,7 +116,7 @@ public class AddUsageTest extends AbstractUMLTest {
assertNotNull(addRefClass1InDependency);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLDependency = null;
if (kind.equals(TestKind.ADD)) {
addUMLDependency = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
index 446bf2fc1..c6ec77ee6 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java
@@ -8,7 +8,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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 com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -102,7 +101,7 @@ public class ChangeDependencyTest extends AbstractUMLTest {
// CHECK EXTENSION
// No extension anymore
- assertSame(Integer.valueOf(0), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(0, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff changeUMLDependency = Iterators.find(differences.iterator(), and(
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLDependency);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
index 355a934db..b201bf74d 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java
@@ -8,7 +8,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
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 com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -102,7 +101,7 @@ public class ChangeUsageTest extends AbstractUMLTest {
// CHECK EXTENSION
// no extension any more
- assertSame(Integer.valueOf(0), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(0, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff changeUMLDependency = Iterators.find(differences.iterator(), and(
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLDependency);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
index baf4844e0..20625f33e 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java
@@ -10,7 +10,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -189,7 +188,7 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
assertNotNull(addCoveredInActionExecSpec);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ExecutionSpecificationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ExecutionSpecificationChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(differences.iterator(), and(
@@ -303,20 +302,17 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
assertEquals(3, comparison.getEquivalences().size());
assertNotNull(addCoveredInStart.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInStart.getEquivalence().getDifferences()
- .size()));
+ assertEquals(2, addCoveredInStart.getEquivalence().getDifferences().size());
assertTrue(addCoveredInStart.getEquivalence().getDifferences().contains(addCoveredInStart));
assertTrue(addCoveredInStart.getEquivalence().getDifferences().contains(addCoveredByInLifeline1_1));
assertNotNull(addCoveredInFinish.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInFinish.getEquivalence().getDifferences()
- .size()));
+ assertEquals(2, addCoveredInFinish.getEquivalence().getDifferences().size());
assertTrue(addCoveredInFinish.getEquivalence().getDifferences().contains(addCoveredInFinish));
assertTrue(addCoveredInFinish.getEquivalence().getDifferences().contains(addCoveredByInLifeline1_2));
assertNotNull(addCoveredInActionExecSpec.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInActionExecSpec.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInActionExecSpec.getEquivalence().getDifferences().size());
assertTrue(addCoveredInActionExecSpec.getEquivalence().getDifferences().contains(
addCoveredInActionExecSpec));
assertTrue(addCoveredInActionExecSpec.getEquivalence().getDifferences().contains(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
index d149f12bd..c278fc369 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java
@@ -10,7 +10,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -189,7 +188,7 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
assertNotNull(addCoveredInActionExecSpec);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ExecutionSpecificationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ExecutionSpecificationChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(differences.iterator(), and(
@@ -303,20 +302,17 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
assertEquals(3, comparison.getEquivalences().size());
assertNotNull(addCoveredInStart.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInStart.getEquivalence().getDifferences()
- .size()));
+ assertEquals(2, addCoveredInStart.getEquivalence().getDifferences().size());
assertTrue(addCoveredInStart.getEquivalence().getDifferences().contains(addCoveredInStart));
assertTrue(addCoveredInStart.getEquivalence().getDifferences().contains(addCoveredByInLifeline1_1));
assertNotNull(addCoveredInFinish.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInFinish.getEquivalence().getDifferences()
- .size()));
+ assertEquals(2, addCoveredInFinish.getEquivalence().getDifferences().size());
assertTrue(addCoveredInFinish.getEquivalence().getDifferences().contains(addCoveredInFinish));
assertTrue(addCoveredInFinish.getEquivalence().getDifferences().contains(addCoveredByInLifeline1_2));
assertNotNull(addCoveredInActionExecSpec.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInActionExecSpec.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInActionExecSpec.getEquivalence().getDifferences().size());
assertTrue(addCoveredInActionExecSpec.getEquivalence().getDifferences().contains(
addCoveredInActionExecSpec));
assertTrue(addCoveredInActionExecSpec.getEquivalence().getDifferences().contains(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
index 18d211c72..987072c7b 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java
@@ -10,7 +10,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -122,7 +121,7 @@ public class AddExtendTest extends AbstractUMLTest {
assertNotNull(addExtensionPoint);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ExtendChange.class)));
+ assertEquals(1, count(differences, instanceOf(ExtendChange.class)));
Diff addUMLExtend = null;
if (kind.equals(TestKind.ADD)) {
addUMLExtend = Iterators.find(differences.iterator(), and(instanceOf(ExtendChange.class),
@@ -143,8 +142,7 @@ public class AddExtendTest extends AbstractUMLTest {
assertEquals(1, addRefExtendedCaseInExtend.getRequires().size());
assertTrue(addRefExtendedCaseInExtend.getRequires().contains(addExtend));
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefExtensionLocationInExtend.getRequires()
- .size()));
+ assertEquals(2, addRefExtensionLocationInExtend.getRequires().size());
assertTrue(addRefExtensionLocationInExtend.getRequires().contains(addExtend));
assertTrue(addRefExtensionLocationInExtend.getRequires().contains(addExtensionPoint));
@@ -153,8 +151,7 @@ public class AddExtendTest extends AbstractUMLTest {
} else {
assertEquals(0, addRefExtendedCaseInExtend.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefExtensionLocationInExtend.getRequires()
- .size()));
+ assertEquals(0, addRefExtensionLocationInExtend.getRequires().size());
assertEquals(2, addExtend.getRequires().size());
assertTrue(addExtend.getRequires().contains(addRefExtendedCaseInExtend));
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
index f42fac73b..5c531c47e 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java
@@ -9,7 +9,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.referenceValueM
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
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.base.Predicate;
@@ -143,7 +142,7 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
assertNotNull(addRefGeneralizationInGeneralizationSet2);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(GeneralizationSetChange.class)));
+ assertEquals(1, count(differences, instanceOf(GeneralizationSetChange.class)));
Diff addUMLGeneralizationSet = null;
if (kind.equals(TestKind.ADD)) {
addUMLGeneralizationSet = Iterators.find(differences.iterator(), and(
@@ -162,36 +161,28 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefGeneralizationInGeneralizationSet1
- .getRequires().size()));
+ assertEquals(1, addRefGeneralizationInGeneralizationSet1.getRequires().size());
assertTrue(addRefGeneralizationInGeneralizationSet1.getRequires().contains(addGeneralizationSet));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefGeneralizationInGeneralizationSet2
- .getRequires().size()));
+ assertEquals(1, addRefGeneralizationInGeneralizationSet2.getRequires().size());
assertTrue(addRefGeneralizationInGeneralizationSet2.getRequires().contains(addGeneralizationSet));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefGeneralizationSetInClass0.getRequires()
- .size()));
+ assertEquals(1, addRefGeneralizationSetInClass0.getRequires().size());
assertTrue(addRefGeneralizationSetInClass0.getRequires().contains(addGeneralizationSet));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefGeneralizationSetInClass2.getRequires()
- .size()));
+ assertEquals(1, addRefGeneralizationSetInClass2.getRequires().size());
assertTrue(addRefGeneralizationSetInClass2.getRequires().contains(addGeneralizationSet));
assertEquals(0, addGeneralizationSet.getRequires().size());
assertEquals(0, addUMLGeneralizationSet.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationInGeneralizationSet1
- .getRequires().size()));
+ assertEquals(0, addRefGeneralizationInGeneralizationSet1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationInGeneralizationSet2
- .getRequires().size()));
+ assertEquals(0, addRefGeneralizationInGeneralizationSet2.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationSetInClass0.getRequires()
- .size()));
+ assertEquals(0, addRefGeneralizationSetInClass0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationSetInClass2.getRequires()
- .size()));
+ assertEquals(0, addRefGeneralizationSetInClass2.getRequires().size());
assertEquals(4, addGeneralizationSet.getRequires().size());
assertTrue(addGeneralizationSet.getRequires().contains(addRefGeneralizationInGeneralizationSet1));
@@ -206,14 +197,12 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
assertEquals(2, comparison.getEquivalences().size());
assertNotNull(addRefGeneralizationInGeneralizationSet1.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefGeneralizationInGeneralizationSet1
- .getEquivalence().getDifferences().size()));
+ assertEquals(2, addRefGeneralizationInGeneralizationSet1.getEquivalence().getDifferences().size());
assertTrue(addRefGeneralizationInGeneralizationSet1.getEquivalence().getDifferences().contains(
addRefGeneralizationSetInClass0));
assertNotNull(addRefGeneralizationInGeneralizationSet2.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addRefGeneralizationInGeneralizationSet2
- .getEquivalence().getDifferences().size()));
+ assertEquals(2, addRefGeneralizationInGeneralizationSet2.getEquivalence().getDifferences().size());
assertTrue(addRefGeneralizationInGeneralizationSet2.getEquivalence().getDifferences().contains(
addRefGeneralizationSetInClass2));
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
index 67bae66da..e7274482f 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java
@@ -8,7 +8,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
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.base.Predicate;
@@ -107,7 +106,7 @@ public class AddIncludeTest extends AbstractUMLTest {
assertNotNull(addRefExtendedCaseInExtend);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(DirectedRelationshipChange.class)));
+ assertEquals(1, count(differences, instanceOf(DirectedRelationshipChange.class)));
Diff addUMLExtend = null;
if (kind.equals(TestKind.ADD)) {
addUMLExtend = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
index 93a368d4b..750393682 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java
@@ -12,7 +12,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromRefe
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -323,7 +322,7 @@ public class AddMessageTest extends AbstractUMLTest {
assertNotNull(addMessageRecv);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(MessageChange.class)));
+ assertEquals(1, count(differences, instanceOf(MessageChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(differences.iterator(), and(instanceOf(MessageChange.class),
@@ -425,16 +424,14 @@ public class AddMessageTest extends AbstractUMLTest {
assertEquals(2, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Send0.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Send0.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInMessage0Send0.getEquivalence().getDifferences().size());
assertTrue(addCoveredInMessage0Send0.getEquivalence().getDifferences().contains(
addCoveredInMessage0Send0));
assertTrue(addCoveredInMessage0Send0.getEquivalence().getDifferences().contains(
addCoveredByInLifeline0));
assertNotNull(addCoveredInMessage0Recv0.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Recv0.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInMessage0Recv0.getEquivalence().getDifferences().size());
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
addCoveredInMessage0Recv0));
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
@@ -508,7 +505,7 @@ public class AddMessageTest extends AbstractUMLTest {
assertNotNull(addMessageRecv);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(useFullDiffs, instanceOf(MessageChange.class)));
+ assertEquals(1, count(useFullDiffs, instanceOf(MessageChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(useFullDiffs.iterator(), and(instanceOf(MessageChange.class),
@@ -571,8 +568,7 @@ public class AddMessageTest extends AbstractUMLTest {
assertEquals(1, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Recv0.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Recv0.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInMessage0Recv0.getEquivalence().getDifferences().size());
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
addCoveredInMessage0Recv0));
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
@@ -648,7 +644,7 @@ public class AddMessageTest extends AbstractUMLTest {
assertNotNull(addMessageRecv);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(useFullDiffs, instanceOf(MessageChange.class)));
+ assertEquals(1, count(useFullDiffs, instanceOf(MessageChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(useFullDiffs.iterator(), and(instanceOf(MessageChange.class),
@@ -711,8 +707,7 @@ public class AddMessageTest extends AbstractUMLTest {
assertEquals(1, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Recv0.getEquivalence());
- assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Recv0.getEquivalence()
- .getDifferences().size()));
+ assertEquals(2, addCoveredInMessage0Recv0.getEquivalence().getDifferences().size());
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
addCoveredInMessage0Recv0));
assertTrue(addCoveredInMessage0Recv0.getEquivalence().getDifferences().contains(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java
index 5fabc3b2b..c5577059a 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java
@@ -6,7 +6,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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.base.Predicate;
@@ -204,7 +203,7 @@ public class DynamicProfileTest extends AbstractDynamicProfileTest {
assertNotNull(addReferencesInUMLAnnotation);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
Diff addUMLProfileApplication = null;
if (kind.equals(TestKind.ADD)) {
addUMLProfileApplication = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java
index 2389518e0..660eeb59f 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java
@@ -6,7 +6,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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.base.Predicate;
@@ -194,7 +193,7 @@ public class StaticProfileTest extends AbstractStaticProfileTest {
assertNotNull(addReferencesInUMLAnnotation);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
Diff addUMLProfileApplication = null;
if (kind.equals(TestKind.ADD)) {
addUMLProfileApplication = Iterators.find(differences.iterator(), and(
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
index 3a634fe9d..8d18df470 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
@@ -20,7 +20,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueIs;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatches;
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.base.Predicate;
@@ -618,8 +617,8 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(addRefBaseClass);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
- assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(StereotypeApplicationChange.class)));
Diff addUMLProfileApplication = null;
Diff addUMLStereotypeApplication = null;
if (kind.equals(TestKind.ADD)) {
@@ -790,8 +789,8 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(addRefBaseClass);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
- assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(StereotypeApplicationChange.class)));
Diff addUMLProfileApplication = null;
Diff addUMLStereotypeApplication = null;
if (kind.equals(TestKind.ADD)) {
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
index f9944d9fb..ac26e38da 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
@@ -20,7 +20,6 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueIs;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatches;
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.base.Predicate;
@@ -761,8 +760,8 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(addRefBaseClass);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
- assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(StereotypeApplicationChange.class)));
Diff addUMLProfileApplication = null;
Diff addUMLStereotypeApplication = null;
if (kind.equals(TestKind.ADD)) {
@@ -933,8 +932,8 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(addRefBaseClass);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(ProfileApplicationChange.class)));
- assertSame(Integer.valueOf(1), count(differences, instanceOf(StereotypeApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(ProfileApplicationChange.class)));
+ assertEquals(1, count(differences, instanceOf(StereotypeApplicationChange.class)));
Diff addUMLProfileApplication = null;
Diff addUMLStereotypeApplication = null;
if (kind.equals(TestKind.ADD)) {
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
index 29da910a5..ead926103 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java
@@ -10,7 +10,6 @@ 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.assertSame;
import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
@@ -154,7 +153,7 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
assertNotNull(addMaxInTimeInterval);
// CHECK EXTENSION
- assertSame(Integer.valueOf(1), count(differences, instanceOf(IntervalConstraintChange.class)));
+ assertEquals(1, count(differences, instanceOf(IntervalConstraintChange.class)));
Diff addUMLMessage = null;
if (kind.equals(TestKind.ADD)) {
addUMLMessage = Iterators.find(differences.iterator(), and(
@@ -192,8 +191,7 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
assertEquals(1, addMaxValue.getRequires().size());
assertTrue(addMaxValue.getRequires().contains(addTimeExpressionMax));
- assertSame(Integer.valueOf(1), Integer.valueOf(addConstrainedElementInTimeConstraint
- .getRequires().size()));
+ assertEquals(1, addConstrainedElementInTimeConstraint.getRequires().size());
assertTrue(addTimeInterval.getRequires().contains(addTimeConstraint));
assertEquals(2, addMinInTimeInterval.getRequires().size());
@@ -225,8 +223,7 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
assertEquals(0, addMaxValue.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addConstrainedElementInTimeConstraint
- .getRequires().size()));
+ assertEquals(0, addConstrainedElementInTimeConstraint.getRequires().size());
assertEquals(0, addMinInTimeInterval.getRequires().size());

Back to the top