Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2014-08-13 06:02:04 -0400
committerMikaël Barbero2014-08-13 08:18:10 -0400
commitdf46467b8b0106768da96f4190f6de12b322765c (patch)
treee9fcc5fedd4b408076e7e9519ba6d8d902758179 /plugins/org.eclipse.emf.compare.uml2.tests
parent21ef448060b13804c542827f2cae58a6bb3b68dd (diff)
downloadorg.eclipse.emf.compare-df46467b8b0106768da96f4190f6de12b322765c.tar.gz
org.eclipse.emf.compare-df46467b8b0106768da96f4190f6de12b322765c.tar.xz
org.eclipse.emf.compare-df46467b8b0106768da96f4190f6de12b322765c.zip
Do not use assertSame for int comparison
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche2ItemProvider.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche3ItemProvider.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/AClicheItemProvider.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileEditPlugin.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileItemProviderAdapterFactory.java2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java3
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation2Test.java53
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociation3Test.java53
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/AddAssociationTest.java45
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/association/ChangeAssociationTest.java35
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddAbstractionTest.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddDependencyTest.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddInterfaceRealizationTest.java10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddRealizationTest.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddSubstitutionTest.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/AddUsageTest.java18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeDependencyTest.java17
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/dependency/ChangeUsageTest.java17
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddActionExecutionSpecificationTest.java67
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/executionSpecification/AddBehaviorExecutionSpecificationTest.java67
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/extend/AddExtendTest.java27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/generalizationSet/AddGeneralizationSetTest.java23
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java11
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java11
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/include/AddIncludeTest.java27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/message/AddMessageTest.java121
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/DynamicProfileTest.java27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/StaticProfileTest.java27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java97
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java93
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/timeConstraint/AddTimeConstraintTest.java47
33 files changed, 492 insertions, 489 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java
index e8963f206..1138ca9e5 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl;
-import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.*;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfileFactory;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
import org.eclipse.emf.ecore.EClass;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche2ItemProvider.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche2ItemProvider.java
index 2aa61ddfe..92c972147 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche2ItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche2ItemProvider.java
@@ -15,12 +15,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche3ItemProvider.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche3ItemProvider.java
index 8319cf3cc..b10a1230f 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche3ItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/ACliche3ItemProvider.java
@@ -15,11 +15,8 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/AClicheItemProvider.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/AClicheItemProvider.java
index 2732d6ec3..9dc580f01 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/AClicheItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/AClicheItemProvider.java
@@ -15,12 +15,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileEditPlugin.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileEditPlugin.java
index edb6fa21e..a8edef3d7 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileEditPlugin.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileEditPlugin.java
@@ -11,11 +11,8 @@
package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.provider;
import org.eclipse.emf.common.EMFPlugin;
-
import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
-
import org.eclipse.uml2.uml.edit.UMLEditPlugin;
/**
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileItemProviderAdapterFactory.java
index dcba48186..98249deaf 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/provider/UML2CompareTestProfileItemProviderAdapterFactory.java
@@ -16,9 +16,7 @@ import java.util.Collection;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
-
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util.UML2CompareTestProfileAdapterFactory;
-
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java
index 5db335f2f..b8c67a4e5 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java
@@ -13,8 +13,9 @@ package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.*;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2;
+import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
import org.eclipse.emf.ecore.EObject;
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 d6e3a5919..594d8397f 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
@@ -2,9 +2,6 @@ package org.eclipse.emf.compare.uml2.tests.association;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
@@ -13,6 +10,10 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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;
import com.google.common.collect.Iterators;
@@ -24,8 +25,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -137,7 +138,7 @@ public class AddAssociation2Test extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(14), Integer.valueOf(differences.size()));
+ assertEquals(14, differences.size());
Predicate<? super Diff> addAssociationDescription = null;
Predicate<? super Diff> addPropertyClass1Description = null;
@@ -248,7 +249,7 @@ public class AddAssociation2Test extends AbstractUMLTest {
instanceOf(AssociationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLAssociation);
- assertSame(Integer.valueOf(13), Integer.valueOf(addUMLAssociation.getRefinedBy().size()));
+ assertEquals(13, addUMLAssociation.getRefinedBy().size());
assertTrue(addUMLAssociation.getRefinedBy().contains(addAssociation));
assertTrue(addUMLAssociation.getRefinedBy().contains(addPropertyClass1));
@@ -266,10 +267,10 @@ public class AddAssociation2Test extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addPropertyClass1.getRequires().size()));
+ assertEquals(1, addPropertyClass1.getRequires().size());
assertTrue(addPropertyClass1.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addPropertyClass0.getRequires().size()));
+ assertEquals(0, addPropertyClass0.getRequires().size());
assertSame(Integer.valueOf(2), Integer.valueOf(addPropertyClass0InAssociation.getRequires()
.size()));
@@ -281,7 +282,7 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addPropertyClass1));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addPropertyClass1));
assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
@@ -289,32 +290,32 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addPropertyClass0));
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass0.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass0.getRequires().size());
assertTrue(addRefTypeInPropertyClass0.getRequires().contains(addPropertyClass0));
- assertSame(Integer.valueOf(0), Integer.valueOf(addAssociation.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addAssociation.getRequires().size());
+ assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass1.getRequires().size());
assertTrue(addLiteralIntegerInClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass1.getRequires().size());
assertTrue(addUnlimitedNaturalInClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass0.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass0.getRequires().size());
assertTrue(addLiteralIntegerInClass0.getRequires().contains(addPropertyClass0));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass0.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass0.getRequires().size());
assertTrue(addUnlimitedNaturalInClass0.getRequires().contains(addPropertyClass0));
} else {
- assertSame(Integer.valueOf(5), Integer.valueOf(addPropertyClass1.getRequires().size()));
+ assertEquals(5, addPropertyClass1.getRequires().size());
assertTrue(addPropertyClass1.getRequires().contains(addLiteralIntegerInClass1));
assertTrue(addPropertyClass1.getRequires().contains(addUnlimitedNaturalInClass1));
assertTrue(addPropertyClass1.getRequires().contains(addRefAssociationInPropertyClass1));
assertTrue(addPropertyClass1.getRequires().contains(addRefTypeInPropertyClass1));
assertTrue(addPropertyClass1.getRequires().contains(addPropertyClass1InAssociation));
- assertSame(Integer.valueOf(5), Integer.valueOf(addPropertyClass0.getRequires().size()));
+ assertEquals(5, addPropertyClass0.getRequires().size());
assertTrue(addPropertyClass0.getRequires().contains(addLiteralIntegerInClass0));
assertTrue(addPropertyClass0.getRequires().contains(addUnlimitedNaturalInClass0));
assertTrue(addPropertyClass0.getRequires().contains(addRefAssociationInPropertyClass0));
@@ -323,24 +324,24 @@ public class AddAssociation2Test extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass0.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass0.getRequires().size());
- assertSame(Integer.valueOf(5), Integer.valueOf(addAssociation.getRequires().size()));
+ assertEquals(5, addAssociation.getRequires().size());
assertTrue(addAssociation.getRequires().contains(addPropertyClass1));
assertTrue(addAssociation.getRequires().contains(addRefAssociationInPropertyClass1));
assertTrue(addAssociation.getRequires().contains(addRefAssociationInPropertyClass0));
assertTrue(addAssociation.getRequires().contains(addPropertyClass0InAssociation));
assertTrue(addAssociation.getRequires().contains(addPropertyClass1InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass0.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass0.getRequires().size()));
+ assertEquals(0, addLiteralIntegerInClass1.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass1.getRequires().size());
+ assertEquals(0, addLiteralIntegerInClass0.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass0.getRequires().size());
}
assertNotNull(addPropertyClass0InAssociation.getEquivalence());
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 abf19ece8..48b64e7f6 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
@@ -2,9 +2,6 @@ package org.eclipse.emf.compare.uml2.tests.association;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
@@ -13,6 +10,10 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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;
import com.google.common.collect.Iterators;
@@ -24,8 +25,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -138,7 +139,7 @@ public class AddAssociation3Test extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(14), Integer.valueOf(differences.size()));
+ assertEquals(14, differences.size());
Predicate<? super Diff> addAssociationDescription = null;
Predicate<? super Diff> addPropertyClass1Description = null;
@@ -250,7 +251,7 @@ public class AddAssociation3Test extends AbstractUMLTest {
instanceOf(AssociationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLAssociation);
- assertSame(Integer.valueOf(13), Integer.valueOf(addUMLAssociation.getRefinedBy().size()));
+ assertEquals(13, addUMLAssociation.getRefinedBy().size());
assertTrue(addUMLAssociation.getRefinedBy().contains(addRefTypeInPropertyClass1));
assertTrue(addUMLAssociation.getRefinedBy().contains(addLiteralIntegerInClass1));
assertTrue(addUMLAssociation.getRefinedBy().contains(addUnlimitedNaturalInClass1));
@@ -267,10 +268,10 @@ public class AddAssociation3Test extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addPropertyClass0.getRequires().size()));
+ assertEquals(1, addPropertyClass0.getRequires().size());
assertTrue(addPropertyClass0.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addPropertyClass1.getRequires().size()));
+ assertEquals(0, addPropertyClass1.getRequires().size());
assertSame(Integer.valueOf(2), Integer.valueOf(addPropertyClass1InAssociation.getRequires()
.size()));
@@ -282,7 +283,7 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addPropertyClass1));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addPropertyClass1));
assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
@@ -290,32 +291,32 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addPropertyClass0));
assertTrue(addRefAssociationInPropertyClass0.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass0.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass0.getRequires().size());
assertTrue(addRefTypeInPropertyClass0.getRequires().contains(addPropertyClass0));
- assertSame(Integer.valueOf(0), Integer.valueOf(addAssociation.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addAssociation.getRequires().size());
+ assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass1.getRequires().size());
assertTrue(addLiteralIntegerInClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass1.getRequires().size());
assertTrue(addUnlimitedNaturalInClass1.getRequires().contains(addPropertyClass1));
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass0.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass0.getRequires().size());
assertTrue(addLiteralIntegerInClass0.getRequires().contains(addPropertyClass0));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass0.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass0.getRequires().size());
assertTrue(addUnlimitedNaturalInClass0.getRequires().contains(addPropertyClass0));
} else {
- assertSame(Integer.valueOf(5), Integer.valueOf(addPropertyClass1.getRequires().size()));
+ assertEquals(5, addPropertyClass1.getRequires().size());
assertTrue(addPropertyClass1.getRequires().contains(addLiteralIntegerInClass1));
assertTrue(addPropertyClass1.getRequires().contains(addUnlimitedNaturalInClass1));
assertTrue(addPropertyClass1.getRequires().contains(addRefAssociationInPropertyClass1));
assertTrue(addPropertyClass1.getRequires().contains(addRefTypeInPropertyClass1));
assertTrue(addPropertyClass1.getRequires().contains(addPropertyClass1InAssociation));
- assertSame(Integer.valueOf(5), Integer.valueOf(addPropertyClass0.getRequires().size()));
+ assertEquals(5, addPropertyClass0.getRequires().size());
assertTrue(addPropertyClass0.getRequires().contains(addLiteralIntegerInClass0));
assertTrue(addPropertyClass0.getRequires().contains(addUnlimitedNaturalInClass0));
assertTrue(addPropertyClass0.getRequires().contains(addRefAssociationInPropertyClass0));
@@ -324,24 +325,24 @@ public class AddAssociation3Test extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass0.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass0.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass0.getRequires().size());
- assertSame(Integer.valueOf(5), Integer.valueOf(addAssociation.getRequires().size()));
+ assertEquals(5, addAssociation.getRequires().size());
assertTrue(addAssociation.getRequires().contains(addPropertyClass0));
assertTrue(addAssociation.getRequires().contains(addRefAssociationInPropertyClass1));
assertTrue(addAssociation.getRequires().contains(addRefAssociationInPropertyClass0));
assertTrue(addAssociation.getRequires().contains(addPropertyClass1InAssociation));
assertTrue(addAssociation.getRequires().contains(addPropertyClass0InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass0.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass0.getRequires().size()));
+ assertEquals(0, addLiteralIntegerInClass1.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass1.getRequires().size());
+ assertEquals(0, addLiteralIntegerInClass0.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass0.getRequires().size());
}
assertNotNull(addPropertyClass1InAssociation.getEquivalence());
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 beb4b04e5..76ebb4fd2 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
@@ -2,9 +2,6 @@ package org.eclipse.emf.compare.uml2.tests.association;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
@@ -13,6 +10,10 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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;
import com.google.common.collect.Iterators;
@@ -24,8 +25,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -139,7 +140,7 @@ public class AddAssociationTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 16 differences
- assertSame(Integer.valueOf(16), Integer.valueOf(differences.size()));
+ assertEquals(16, differences.size());
Predicate<? super Diff> addAssociationDescription = null;
Predicate<? super Diff> addNavigableOwnedEndClass1InAssociationDescription = null;
@@ -268,7 +269,7 @@ public class AddAssociationTest extends AbstractUMLTest {
instanceOf(AssociationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLAssociation);
- assertSame(Integer.valueOf(15), Integer.valueOf(addUMLAssociation.getRefinedBy().size()));
+ assertEquals(15, addUMLAssociation.getRefinedBy().size());
assertTrue(addUMLAssociation.getRefinedBy().contains(addAssociation));
assertTrue(addUMLAssociation.getRefinedBy().contains(addNavigableOwnedEndClass1InAssociation));
assertTrue(addUMLAssociation.getRefinedBy().contains(addNavigableOwnedEndClass2InAssociation));
@@ -293,7 +294,7 @@ public class AddAssociationTest extends AbstractUMLTest {
addOwnedEndClass1InAssociation));
assertTrue(addRefAssociationInPropertyClass1.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass1.getRequires().size());
assertTrue(addRefTypeInPropertyClass1.getRequires().contains(addOwnedEndClass1InAssociation));
assertSame(Integer.valueOf(2), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
@@ -302,11 +303,11 @@ public class AddAssociationTest extends AbstractUMLTest {
addOwnedEndClass2InAssociation));
assertTrue(addRefAssociationInPropertyClass2.getRequires().contains(addAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass2.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass2.getRequires().size());
assertTrue(addRefTypeInPropertyClass2.getRequires().contains(addOwnedEndClass2InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addAssociation.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addAssociation.getRequires().size());
+ assertEquals(0, addUMLAssociation.getRequires().size());
assertSame(Integer.valueOf(2), Integer.valueOf(addNavigableOwnedEndClass1InAssociation
.getRequires().size()));
@@ -320,16 +321,16 @@ public class AddAssociationTest extends AbstractUMLTest {
assertTrue(addNavigableOwnedEndClass2InAssociation.getRequires().contains(
addOwnedEndClass2InAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass1.getRequires().size());
assertTrue(addLiteralIntegerInClass1.getRequires().contains(addOwnedEndClass1InAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass1.getRequires().size());
assertTrue(addUnlimitedNaturalInClass1.getRequires().contains(addOwnedEndClass1InAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass2.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass2.getRequires().size());
assertTrue(addLiteralIntegerInClass2.getRequires().contains(addOwnedEndClass2InAssociation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass2.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass2.getRequires().size());
assertTrue(addUnlimitedNaturalInClass2.getRequires().contains(addOwnedEndClass2InAssociation));
} else {
assertSame(Integer.valueOf(0), Integer.valueOf(addNavigableOwnedEndClass1InAssociation
@@ -340,12 +341,12 @@ public class AddAssociationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass1.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass1.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass1.getRequires().size());
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass2.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass2.getRequires().size());
- assertSame(Integer.valueOf(8), Integer.valueOf(addAssociation.getRequires().size()));
+ assertEquals(8, addAssociation.getRequires().size());
assertTrue(addAssociation.getRequires().contains(addNavigableOwnedEndClass1InAssociation));
assertTrue(addAssociation.getRequires().contains(addNavigableOwnedEndClass2InAssociation));
assertTrue(addAssociation.getRequires().contains(addRefAssociationInPropertyClass1));
@@ -355,12 +356,12 @@ public class AddAssociationTest extends AbstractUMLTest {
assertTrue(addAssociation.getRequires().contains(addMemberEndClass1InAssociation));
assertTrue(addAssociation.getRequires().contains(addMemberEndClass2InAssociation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLAssociation.getRequires().size()));
+ assertEquals(0, addUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass1.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass2.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass2.getRequires().size()));
+ assertEquals(0, addLiteralIntegerInClass1.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass1.getRequires().size());
+ assertEquals(0, addLiteralIntegerInClass2.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass2.getRequires().size());
testIntersections(comparison);
}
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 fbf2eb751..61487e7b6 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
@@ -2,16 +2,17 @@ package org.eclipse.emf.compare.uml2.tests.association;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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.base.Predicate;
import com.google.common.collect.Iterators;
@@ -23,8 +24,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -138,7 +139,7 @@ public class ChangeAssociationTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(6), Integer.valueOf(differences.size()));
+ assertEquals(6, differences.size());
Predicate<? super Diff> addPropertyClass2Description = null;
Predicate<? super Diff> addRefAssociationInPropertyClass2Description = null;
@@ -197,7 +198,7 @@ public class ChangeAssociationTest extends AbstractUMLTest {
instanceOf(AssociationChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLAssociation);
// assertNotNull(changeUMLAssociation);
- // assertSame(Integer.valueOf(5), Integer.valueOf(changeUMLAssociation.getRefinedBy().size()));
+ // assertEquals(5, changeUMLAssociation.getRefinedBy().size());
// assertTrue(changeUMLAssociation.getRefinedBy().contains(addRefTypeInPropertyClass2));
// assertTrue(changeUMLAssociation.getRefinedBy().contains(addLiteralIntegerInClass2));
// assertTrue(changeUMLAssociation.getRefinedBy().contains(addUnlimitedNaturalInClass2));
@@ -206,24 +207,24 @@ public class ChangeAssociationTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addPropertyClass2.getRequires().size()));
+ assertEquals(0, addPropertyClass2.getRequires().size());
assertSame(Integer.valueOf(1), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
.size()));
assertTrue(addRefAssociationInPropertyClass2.getRequires().contains(addPropertyClass2));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefTypeInPropertyClass2.getRequires().size()));
+ assertEquals(1, addRefTypeInPropertyClass2.getRequires().size());
assertTrue(addRefTypeInPropertyClass2.getRequires().contains(addPropertyClass2));
- // assertSame(Integer.valueOf(0), Integer.valueOf(changeUMLAssociation.getRequires().size()));
+ // assertEquals(0, changeUMLAssociation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addLiteralIntegerInClass2.getRequires().size()));
+ assertEquals(1, addLiteralIntegerInClass2.getRequires().size());
assertTrue(addLiteralIntegerInClass2.getRequires().contains(addPropertyClass2));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUnlimitedNaturalInClass2.getRequires().size()));
+ assertEquals(1, addUnlimitedNaturalInClass2.getRequires().size());
assertTrue(addUnlimitedNaturalInClass2.getRequires().contains(addPropertyClass2));
} else {
- assertSame(Integer.valueOf(5), Integer.valueOf(addPropertyClass2.getRequires().size()));
+ assertEquals(5, addPropertyClass2.getRequires().size());
assertTrue(addPropertyClass2.getRequires().contains(addLiteralIntegerInClass2));
assertTrue(addPropertyClass2.getRequires().contains(addUnlimitedNaturalInClass2));
assertTrue(addPropertyClass2.getRequires().contains(addRefAssociationInPropertyClass2));
@@ -232,10 +233,10 @@ public class ChangeAssociationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefAssociationInPropertyClass2.getRequires()
.size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefTypeInPropertyClass2.getRequires().size()));
- // assertSame(Integer.valueOf(0), Integer.valueOf(changeUMLAssociation.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addLiteralIntegerInClass2.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUnlimitedNaturalInClass2.getRequires().size()));
+ assertEquals(0, addRefTypeInPropertyClass2.getRequires().size());
+ // assertEquals(0, changeUMLAssociation.getRequires().size());
+ assertEquals(0, addLiteralIntegerInClass2.getRequires().size());
+ assertEquals(0, addUnlimitedNaturalInClass2.getRequires().size());
}
testIntersections(comparison);
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 02db99fb3..8cbb8d74a 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
@@ -129,31 +129,31 @@ public class AddAbstractionTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(3, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InAbstraction));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InAbstraction));
assertTrue(addUMLDependency.getRefinedBy().contains(addAbstraction));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InAbstraction.getRequires().size()));
+ assertEquals(1, addRefClass1InAbstraction.getRequires().size());
assertTrue(addRefClass1InAbstraction.getRequires().contains(addAbstraction));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass0InAbstraction.getRequires().size()));
+ assertEquals(1, addRefClass0InAbstraction.getRequires().size());
assertTrue(addRefClass0InAbstraction.getRequires().contains(addAbstraction));
- assertSame(Integer.valueOf(0), Integer.valueOf(addAbstraction.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addAbstraction.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InAbstraction.getRequires().size()));
+ assertEquals(0, addRefClass1InAbstraction.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass0InAbstraction.getRequires().size()));
+ assertEquals(0, addRefClass0InAbstraction.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addAbstraction.getRequires().size()));
+ assertEquals(2, addAbstraction.getRequires().size());
assertTrue(addAbstraction.getRequires().contains(addRefClass1InAbstraction));
assertTrue(addAbstraction.getRequires().contains(addRefClass0InAbstraction));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
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 00ed56db6..3582711b7 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
@@ -128,32 +128,32 @@ public class AddDependencyTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(3, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(1, addRefClass0InDependency.getRequires().size());
assertTrue(addRefClass0InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(1, addRefClass1InDependency.getRequires().size());
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addDependency.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(0, addRefClass0InDependency.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(0, addRefClass1InDependency.getRequires().size());
// Was 3 with UML 4.0 but NamedElement::clientDependency has been made derived in UML 5.0
- assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
+ assertEquals(2, addDependency.getRequires().size());
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
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 64096728d..c189cc3ae 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
@@ -140,7 +140,7 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(4, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addClientInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addSupplierInInterfaceRealization));
@@ -158,8 +158,8 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
.size()));
assertTrue(addContractInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(0), Integer.valueOf(addInterfaceRealization.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addInterfaceRealization.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
assertSame(Integer.valueOf(0), Integer.valueOf(addClientInInterfaceRealization.getRequires()
.size()));
@@ -168,12 +168,12 @@ public class AddInterfaceRealizationTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
.size()));
- assertSame(Integer.valueOf(3), Integer.valueOf(addInterfaceRealization.getRequires().size()));
+ assertEquals(3, addInterfaceRealization.getRequires().size());
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addSupplierInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addContractInInterfaceRealization));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
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 ebba6b537..6b3e620b9 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
@@ -129,31 +129,31 @@ public class AddRealizationTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(3, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(1, addRefClass0InDependency.getRequires().size());
assertTrue(addRefClass0InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(1, addRefClass1InDependency.getRequires().size());
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addDependency.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(0, addRefClass0InDependency.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(0, addRefClass1InDependency.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
+ assertEquals(2, addDependency.getRequires().size());
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
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 62da2f0e2..88fa29d28 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
@@ -140,7 +140,7 @@ public class AddSubstitutionTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(4, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addClientInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addSupplierInInterfaceRealization));
assertTrue(addUMLDependency.getRefinedBy().contains(addContractInInterfaceRealization));
@@ -158,8 +158,8 @@ public class AddSubstitutionTest extends AbstractUMLTest {
.size()));
assertTrue(addContractInInterfaceRealization.getRequires().contains(addInterfaceRealization));
- assertSame(Integer.valueOf(0), Integer.valueOf(addInterfaceRealization.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addInterfaceRealization.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
assertSame(Integer.valueOf(0), Integer.valueOf(addClientInInterfaceRealization.getRequires()
.size()));
@@ -168,16 +168,16 @@ public class AddSubstitutionTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addContractInInterfaceRealization.getRequires()
.size()));
- assertSame(Integer.valueOf(3), Integer.valueOf(addInterfaceRealization.getRequires().size()));
+ assertEquals(3, addInterfaceRealization.getRequires().size());
assertTrue(addInterfaceRealization.getRequires().contains(addClientInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addSupplierInInterfaceRealization));
assertTrue(addInterfaceRealization.getRequires().contains(addContractInInterfaceRealization));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
assertNull(addClientInInterfaceRealization.getEquivalence());
testIntersections(comparison);
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 88ae7042f..7ed45c77b 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
@@ -127,31 +127,31 @@ public class AddUsageTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLDependency);
- assertSame(Integer.valueOf(3), Integer.valueOf(addUMLDependency.getRefinedBy().size()));
+ assertEquals(3, addUMLDependency.getRefinedBy().size());
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass0InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addRefClass1InDependency));
assertTrue(addUMLDependency.getRefinedBy().contains(addDependency));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(1, addRefClass0InDependency.getRequires().size());
assertTrue(addRefClass0InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(1, addRefClass1InDependency.getRequires().size());
assertTrue(addRefClass1InDependency.getRequires().contains(addDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addDependency.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addDependency.getRequires().size());
+ assertEquals(0, addUMLDependency.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass0InDependency.getRequires().size()));
+ assertEquals(0, addRefClass0InDependency.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefClass1InDependency.getRequires().size()));
+ assertEquals(0, addRefClass1InDependency.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addDependency.getRequires().size()));
+ assertEquals(2, addDependency.getRequires().size());
assertTrue(addDependency.getRequires().contains(addRefClass0InDependency));
assertTrue(addDependency.getRequires().contains(addRefClass1InDependency));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLDependency.getRequires().size()));
+ assertEquals(0, addUMLDependency.getRequires().size());
}
// CHECK EQUIVALENCE
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 ea06f9958..446bf2fc1 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
@@ -2,12 +2,13 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
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 com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -19,8 +20,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -82,7 +83,7 @@ public class ChangeDependencyTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 1 differences
- assertSame(Integer.valueOf(1), Integer.valueOf(differences.size()));
+ assertEquals(1, differences.size());
Predicate<? super Diff> addSupplierInDependencyDescription = null;
@@ -106,14 +107,14 @@ public class ChangeDependencyTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLDependency);
// assertNotNull(changeUMLDependency);
- // assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLDependency.getRefinedBy().size()));
+ // assertEquals(1, changeUMLDependency.getRefinedBy().size());
// assertTrue(changeUMLDependency.getRefinedBy().contains(addSupplierInDependency));
// CHECK REQUIREMENT
- assertSame(Integer.valueOf(0), Integer.valueOf(addSupplierInDependency.getRequires().size()));
+ assertEquals(0, addSupplierInDependency.getRequires().size());
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
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 41c3cf23e..355a934db 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
@@ -2,12 +2,13 @@ package org.eclipse.emf.compare.uml2.tests.dependency;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertSame;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.addedToReference;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
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 com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -19,8 +20,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.dependency.data.DependencyInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -83,7 +84,7 @@ public class ChangeUsageTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(1), Integer.valueOf(differences.size()));
+ assertEquals(1, differences.size());
Predicate<? super Diff> addSupplierInDependencyDescription = null;
@@ -106,14 +107,14 @@ public class ChangeUsageTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.CHANGE)), null);
assertNull(changeUMLDependency);
// assertNotNull(changeUMLDependency);
- // assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLDependency.getRefinedBy().size()));
+ // assertEquals(1, changeUMLDependency.getRefinedBy().size());
// assertTrue(changeUMLDependency.getRefinedBy().contains(addSupplierInDependency));
// CHECK REQUIREMENT
- assertSame(Integer.valueOf(0), Integer.valueOf(addSupplierInDependency.getRequires().size()));
+ assertEquals(0, addSupplierInDependency.getRequires().size());
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
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 687e61ebe..baf4844e0 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
@@ -2,15 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.executionSpecification;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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.ofKind;
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;
import com.google.common.collect.Iterators;
@@ -22,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.ExecutionSpecificationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.executionSpecification.data.ExecutionSpecificationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -85,7 +86,7 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 14 differences
- assertSame(Integer.valueOf(14), Integer.valueOf(differences.size()));
+ assertEquals(14, differences.size());
Predicate<? super Diff> addActionExecSpecDescription = null;
Predicate<? super Diff> addCoveredInStartDescription = null;
@@ -198,7 +199,7 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
instanceOf(ExecutionSpecificationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(13), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(13, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addFinishInActionExecSpec));
assertTrue(addUMLMessage.getRefinedBy().contains(addStartInActionExecSpec));
assertTrue(addUMLMessage.getRefinedBy().contains(addCoveredInFinish));
@@ -216,48 +217,48 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addActionExecSpec.getRequires().size()));
+ assertEquals(0, addActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInStart.getRequires().size()));
+ assertEquals(1, addCoveredInStart.getRequires().size());
assertTrue(addCoveredInStart.getRequires().contains(addStart));
- assertSame(Integer.valueOf(2), Integer.valueOf(addExecutionInStart.getRequires().size()));
+ assertEquals(2, addExecutionInStart.getRequires().size());
assertTrue(addExecutionInStart.getRequires().contains(addStart));
assertTrue(addExecutionInStart.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInFinish.getRequires().size()));
+ assertEquals(1, addCoveredInFinish.getRequires().size());
assertTrue(addCoveredInFinish.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(2), Integer.valueOf(addExecutionInFinish.getRequires().size()));
+ assertEquals(2, addExecutionInFinish.getRequires().size());
assertTrue(addExecutionInFinish.getRequires().contains(addFinish));
assertTrue(addExecutionInFinish.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(2), Integer.valueOf(addFinishInActionExecSpec.getRequires().size()));
+ assertEquals(2, addFinishInActionExecSpec.getRequires().size());
assertTrue(addFinishInActionExecSpec.getRequires().contains(addActionExecSpec));
assertTrue(addFinishInActionExecSpec.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(2), Integer.valueOf(addStartInActionExecSpec.getRequires().size()));
+ assertEquals(2, addStartInActionExecSpec.getRequires().size());
assertTrue(addStartInActionExecSpec.getRequires().contains(addActionExecSpec));
assertTrue(addStartInActionExecSpec.getRequires().contains(addStart));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_1.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_1.getRequires().size());
assertTrue(addCoveredByInLifeline1_1.getRequires().contains(addStart));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_2.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_2.getRequires().size());
assertTrue(addCoveredByInLifeline1_2.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_3.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_3.getRequires().size());
assertTrue(addCoveredByInLifeline1_3.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(0), Integer.valueOf(addStart.getRequires().size()));
+ assertEquals(0, addStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addFinish.getRequires().size()));
+ assertEquals(0, addFinish.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInActionExecSpec.getRequires().size()));
+ assertEquals(1, addCoveredInActionExecSpec.getRequires().size());
assertTrue(addCoveredInActionExecSpec.getRequires().contains(addActionExecSpec));
} else {
- assertSame(Integer.valueOf(6), Integer.valueOf(addActionExecSpec.getRequires().size()));
+ assertEquals(6, addActionExecSpec.getRequires().size());
assertTrue(addActionExecSpec.getRequires().contains(addFinishInActionExecSpec));
assertTrue(addActionExecSpec.getRequires().contains(addStartInActionExecSpec));
assertTrue(addActionExecSpec.getRequires().contains(addCoveredInActionExecSpec));
@@ -265,41 +266,41 @@ public class AddActionExecutionSpecificationTest extends AbstractUMLTest {
assertTrue(addActionExecSpec.getRequires().contains(addExecutionInStart));
assertTrue(addActionExecSpec.getRequires().contains(addCoveredByInLifeline1_3));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInStart.getRequires().size()));
+ assertEquals(0, addCoveredInStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addExecutionInStart.getRequires().size()));
+ assertEquals(0, addExecutionInStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInFinish.getRequires().size()));
+ assertEquals(0, addCoveredInFinish.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addExecutionInFinish.getRequires().size()));
+ assertEquals(0, addExecutionInFinish.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addFinishInActionExecSpec.getRequires().size()));
+ assertEquals(0, addFinishInActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addStartInActionExecSpec.getRequires().size()));
+ assertEquals(0, addStartInActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_1.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_2.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_2.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_3.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_3.getRequires().size());
- assertSame(Integer.valueOf(4), Integer.valueOf(addStart.getRequires().size()));
+ assertEquals(4, addStart.getRequires().size());
assertTrue(addStart.getRequires().contains(addStartInActionExecSpec));
assertTrue(addStart.getRequires().contains(addCoveredByInLifeline1_1));
assertTrue(addStart.getRequires().contains(addCoveredInStart));
assertTrue(addStart.getRequires().contains(addExecutionInStart));
- assertSame(Integer.valueOf(4), Integer.valueOf(addFinish.getRequires().size()));
+ assertEquals(4, addFinish.getRequires().size());
assertTrue(addFinish.getRequires().contains(addFinishInActionExecSpec));
assertTrue(addFinish.getRequires().contains(addCoveredByInLifeline1_2));
assertTrue(addFinish.getRequires().contains(addCoveredInFinish));
assertTrue(addFinish.getRequires().contains(addExecutionInFinish));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInActionExecSpec.getRequires().size()));
+ assertEquals(0, addCoveredInActionExecSpec.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(3), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(3, comparison.getEquivalences().size());
assertNotNull(addCoveredInStart.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInStart.getEquivalence().getDifferences()
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 09e6a1358..d149f12bd 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
@@ -2,15 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.executionSpecification;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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.ofKind;
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;
import com.google.common.collect.Iterators;
@@ -22,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.ExecutionSpecificationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.executionSpecification.data.ExecutionSpecificationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -85,7 +86,7 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 14 differences
- assertSame(Integer.valueOf(14), Integer.valueOf(differences.size()));
+ assertEquals(14, differences.size());
Predicate<? super Diff> addActionExecSpecDescription = null;
Predicate<? super Diff> addCoveredInStartDescription = null;
@@ -198,7 +199,7 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
instanceOf(ExecutionSpecificationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(13), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(13, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addFinishInActionExecSpec));
assertTrue(addUMLMessage.getRefinedBy().contains(addStartInActionExecSpec));
assertTrue(addUMLMessage.getRefinedBy().contains(addCoveredInFinish));
@@ -216,48 +217,48 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addActionExecSpec.getRequires().size()));
+ assertEquals(0, addActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInStart.getRequires().size()));
+ assertEquals(1, addCoveredInStart.getRequires().size());
assertTrue(addCoveredInStart.getRequires().contains(addStart));
- assertSame(Integer.valueOf(2), Integer.valueOf(addExecutionInStart.getRequires().size()));
+ assertEquals(2, addExecutionInStart.getRequires().size());
assertTrue(addExecutionInStart.getRequires().contains(addStart));
assertTrue(addExecutionInStart.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInFinish.getRequires().size()));
+ assertEquals(1, addCoveredInFinish.getRequires().size());
assertTrue(addCoveredInFinish.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(2), Integer.valueOf(addExecutionInFinish.getRequires().size()));
+ assertEquals(2, addExecutionInFinish.getRequires().size());
assertTrue(addExecutionInFinish.getRequires().contains(addFinish));
assertTrue(addExecutionInFinish.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(2), Integer.valueOf(addFinishInActionExecSpec.getRequires().size()));
+ assertEquals(2, addFinishInActionExecSpec.getRequires().size());
assertTrue(addFinishInActionExecSpec.getRequires().contains(addActionExecSpec));
assertTrue(addFinishInActionExecSpec.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(2), Integer.valueOf(addStartInActionExecSpec.getRequires().size()));
+ assertEquals(2, addStartInActionExecSpec.getRequires().size());
assertTrue(addStartInActionExecSpec.getRequires().contains(addActionExecSpec));
assertTrue(addStartInActionExecSpec.getRequires().contains(addStart));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_1.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_1.getRequires().size());
assertTrue(addCoveredByInLifeline1_1.getRequires().contains(addStart));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_2.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_2.getRequires().size());
assertTrue(addCoveredByInLifeline1_2.getRequires().contains(addFinish));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1_3.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1_3.getRequires().size());
assertTrue(addCoveredByInLifeline1_3.getRequires().contains(addActionExecSpec));
- assertSame(Integer.valueOf(0), Integer.valueOf(addStart.getRequires().size()));
+ assertEquals(0, addStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addFinish.getRequires().size()));
+ assertEquals(0, addFinish.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInActionExecSpec.getRequires().size()));
+ assertEquals(1, addCoveredInActionExecSpec.getRequires().size());
assertTrue(addCoveredInActionExecSpec.getRequires().contains(addActionExecSpec));
} else {
- assertSame(Integer.valueOf(6), Integer.valueOf(addActionExecSpec.getRequires().size()));
+ assertEquals(6, addActionExecSpec.getRequires().size());
assertTrue(addActionExecSpec.getRequires().contains(addFinishInActionExecSpec));
assertTrue(addActionExecSpec.getRequires().contains(addStartInActionExecSpec));
assertTrue(addActionExecSpec.getRequires().contains(addCoveredInActionExecSpec));
@@ -265,41 +266,41 @@ public class AddBehaviorExecutionSpecificationTest extends AbstractUMLTest {
assertTrue(addActionExecSpec.getRequires().contains(addExecutionInStart));
assertTrue(addActionExecSpec.getRequires().contains(addCoveredByInLifeline1_3));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInStart.getRequires().size()));
+ assertEquals(0, addCoveredInStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addExecutionInStart.getRequires().size()));
+ assertEquals(0, addExecutionInStart.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInFinish.getRequires().size()));
+ assertEquals(0, addCoveredInFinish.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addExecutionInFinish.getRequires().size()));
+ assertEquals(0, addExecutionInFinish.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addFinishInActionExecSpec.getRequires().size()));
+ assertEquals(0, addFinishInActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addStartInActionExecSpec.getRequires().size()));
+ assertEquals(0, addStartInActionExecSpec.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_1.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_1.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_2.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_2.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1_3.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1_3.getRequires().size());
- assertSame(Integer.valueOf(4), Integer.valueOf(addStart.getRequires().size()));
+ assertEquals(4, addStart.getRequires().size());
assertTrue(addStart.getRequires().contains(addStartInActionExecSpec));
assertTrue(addStart.getRequires().contains(addCoveredByInLifeline1_1));
assertTrue(addStart.getRequires().contains(addCoveredInStart));
assertTrue(addStart.getRequires().contains(addExecutionInStart));
- assertSame(Integer.valueOf(4), Integer.valueOf(addFinish.getRequires().size()));
+ assertEquals(4, addFinish.getRequires().size());
assertTrue(addFinish.getRequires().contains(addFinishInActionExecSpec));
assertTrue(addFinish.getRequires().contains(addCoveredByInLifeline1_2));
assertTrue(addFinish.getRequires().contains(addCoveredInFinish));
assertTrue(addFinish.getRequires().contains(addExecutionInFinish));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInActionExecSpec.getRequires().size()));
+ assertEquals(0, addCoveredInActionExecSpec.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(3), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(3, comparison.getEquivalences().size());
assertNotNull(addCoveredInStart.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInStart.getEquivalence().getDifferences()
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 ae68b2206..18d211c72 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
@@ -2,15 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.extend;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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.ofKind;
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;
import com.google.common.collect.Iterators;
@@ -22,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.ExtendChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.extend.data.ExtendInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -85,7 +86,7 @@ public class AddExtendTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ assertEquals(5, differences.size());
Predicate<? super Diff> addExtendDescription = null;
Predicate<? super Diff> changeRefExtendedCaseInExtendDescription = null;
@@ -131,7 +132,7 @@ public class AddExtendTest extends AbstractUMLTest {
ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLExtend);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLExtend.getRefinedBy().size()));
+ assertEquals(4, addUMLExtend.getRefinedBy().size());
assertTrue(addUMLExtend.getRefinedBy().contains(addRefExtendedCaseInExtend));
assertTrue(addUMLExtend.getRefinedBy().contains(addRefExtensionLocationInExtend));
assertTrue(addUMLExtend.getRefinedBy().contains(addExtensionPoint));
@@ -139,7 +140,7 @@ public class AddExtendTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefExtendedCaseInExtend.getRequires().size()));
+ assertEquals(1, addRefExtendedCaseInExtend.getRequires().size());
assertTrue(addRefExtendedCaseInExtend.getRequires().contains(addExtend));
assertSame(Integer.valueOf(2), Integer.valueOf(addRefExtensionLocationInExtend.getRequires()
@@ -147,23 +148,23 @@ public class AddExtendTest extends AbstractUMLTest {
assertTrue(addRefExtensionLocationInExtend.getRequires().contains(addExtend));
assertTrue(addRefExtensionLocationInExtend.getRequires().contains(addExtensionPoint));
- assertSame(Integer.valueOf(0), Integer.valueOf(addExtend.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLExtend.getRequires().size()));
+ assertEquals(0, addExtend.getRequires().size());
+ assertEquals(0, addUMLExtend.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefExtendedCaseInExtend.getRequires().size()));
+ assertEquals(0, addRefExtendedCaseInExtend.getRequires().size());
assertSame(Integer.valueOf(0), Integer.valueOf(addRefExtensionLocationInExtend.getRequires()
.size()));
- assertSame(Integer.valueOf(2), Integer.valueOf(addExtend.getRequires().size()));
+ assertEquals(2, addExtend.getRequires().size());
assertTrue(addExtend.getRequires().contains(addRefExtendedCaseInExtend));
assertTrue(addExtend.getRequires().contains(addRefExtensionLocationInExtend));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLExtend.getRequires().size()));
+ assertEquals(0, addUMLExtend.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
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 71e67698e..f42fac73b 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
@@ -2,14 +2,15 @@ package org.eclipse.emf.compare.uml2.tests.generalizationSet;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.referenceValueMatch;
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;
import com.google.common.collect.Iterators;
@@ -21,8 +22,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.GeneralizationSetChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.generalizationSet.data.GeneralizationSetInputData;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
@@ -86,7 +87,7 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 6 differences
- assertSame(Integer.valueOf(6), Integer.valueOf(differences.size()));
+ assertEquals(6, differences.size());
Predicate<? super Diff> addGeneralizationSetDescription = null;
Predicate<? super Diff> addRefGeneralizationSetInClass2Description = null;
@@ -152,7 +153,7 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
instanceOf(GeneralizationSetChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLGeneralizationSet);
- assertSame(Integer.valueOf(5), Integer.valueOf(addUMLGeneralizationSet.getRefinedBy().size()));
+ assertEquals(5, addUMLGeneralizationSet.getRefinedBy().size());
assertTrue(addUMLGeneralizationSet.getRefinedBy().contains(addRefGeneralizationInGeneralizationSet1));
assertTrue(addUMLGeneralizationSet.getRefinedBy().contains(addRefGeneralizationInGeneralizationSet2));
assertTrue(addUMLGeneralizationSet.getRefinedBy().contains(addGeneralizationSet));
@@ -177,8 +178,8 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
.size()));
assertTrue(addRefGeneralizationSetInClass2.getRequires().contains(addGeneralizationSet));
- assertSame(Integer.valueOf(0), Integer.valueOf(addGeneralizationSet.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLGeneralizationSet.getRequires().size()));
+ assertEquals(0, addGeneralizationSet.getRequires().size());
+ assertEquals(0, addUMLGeneralizationSet.getRequires().size());
} else {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationInGeneralizationSet1
.getRequires().size()));
@@ -192,17 +193,17 @@ public class AddGeneralizationSetTest extends AbstractUMLTest {
assertSame(Integer.valueOf(0), Integer.valueOf(addRefGeneralizationSetInClass2.getRequires()
.size()));
- assertSame(Integer.valueOf(4), Integer.valueOf(addGeneralizationSet.getRequires().size()));
+ assertEquals(4, addGeneralizationSet.getRequires().size());
assertTrue(addGeneralizationSet.getRequires().contains(addRefGeneralizationInGeneralizationSet1));
assertTrue(addGeneralizationSet.getRequires().contains(addRefGeneralizationInGeneralizationSet2));
assertTrue(addGeneralizationSet.getRequires().contains(addRefGeneralizationSetInClass0));
assertTrue(addGeneralizationSet.getRequires().contains(addRefGeneralizationSetInClass2));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLGeneralizationSet.getRequires().size()));
+ assertEquals(0, addUMLGeneralizationSet.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(2), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(2, comparison.getEquivalences().size());
assertNotNull(addRefGeneralizationInGeneralizationSet1.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addRefGeneralizationInGeneralizationSet1
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
index b1793ab3d..d8071d1a5 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsAssociationTest.java
@@ -2,10 +2,6 @@ package org.eclipse.emf.compare.uml2.tests.implications;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-import static junit.framework.Assert.assertEquals;
-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;
@@ -14,6 +10,9 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.onEObject;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
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.assertNull;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -26,8 +25,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.AssociationChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -937,7 +936,7 @@ public class ImplicationsAssociationTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 16 differences
- assertSame(Integer.valueOf(NB_DIFFS), Integer.valueOf(differences.size()));
+ assertEquals(NB_DIFFS, differences.size());
DiffsOfInterest diffs = getDiffs(comparison, kind);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
index 24411beab..27e3b2af6 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/implications/ImplicationsTransitionTest.java
@@ -1,14 +1,13 @@
package org.eclipse.emf.compare.uml2.tests.implications;
-import static junit.framework.Assert.assertEquals;
-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;
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.assertNull;
+import static org.junit.Assert.assertTrue;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -19,8 +18,8 @@ import java.util.List;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.implications.data.ImplicationsInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -850,7 +849,7 @@ public class ImplicationsTransitionTest extends AbstractUMLTest {
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(NB_DIFFS), Integer.valueOf(differences.size()));
+ assertEquals(NB_DIFFS, differences.size());
DiffsOfInterest diffs = getDiffs(comparison, kind);
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 787be9068..67bae66da 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
@@ -2,13 +2,14 @@ package org.eclipse.emf.compare.uml2.tests.include;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.changedReference;
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;
import com.google.common.collect.Iterators;
@@ -20,8 +21,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.DirectedRelationshipChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.include.data.IncludeInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -83,7 +84,7 @@ public class AddIncludeTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 3 differences
- assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+ assertEquals(3, differences.size());
Predicate<? super Diff> addExtendDescription = null;
Predicate<? super Diff> changeRefExtendedCaseInExtendDescription = null;
@@ -116,28 +117,28 @@ public class AddIncludeTest extends AbstractUMLTest {
instanceOf(DirectedRelationshipChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLExtend);
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLExtend.getRefinedBy().size()));
+ assertEquals(2, addUMLExtend.getRefinedBy().size());
assertTrue(addUMLExtend.getRefinedBy().contains(addRefExtendedCaseInExtend));
assertTrue(addUMLExtend.getRefinedBy().contains(addExtend));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addRefExtendedCaseInExtend.getRequires().size()));
+ assertEquals(1, addRefExtendedCaseInExtend.getRequires().size());
assertTrue(addRefExtendedCaseInExtend.getRequires().contains(addExtend));
- assertSame(Integer.valueOf(0), Integer.valueOf(addExtend.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLExtend.getRequires().size()));
+ assertEquals(0, addExtend.getRequires().size());
+ assertEquals(0, addUMLExtend.getRequires().size());
} else {
- assertSame(Integer.valueOf(0), Integer.valueOf(addRefExtendedCaseInExtend.getRequires().size()));
+ assertEquals(0, addRefExtendedCaseInExtend.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addExtend.getRequires().size()));
+ assertEquals(1, addExtend.getRequires().size());
assertTrue(addExtend.getRequires().contains(addRefExtendedCaseInExtend));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLExtend.getRequires().size()));
+ assertEquals(0, addUMLExtend.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
index f49998838..a44e04a74 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
@@ -28,8 +28,8 @@ import org.eclipse.emf.compare.scope.DefaultComparisonScope;
import org.eclipse.emf.compare.scope.IComparisonScope;
import org.eclipse.emf.compare.uml2.internal.UMLDiff;
import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.association.data.AssociationInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
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 10fda6a52..93a368d4b 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
@@ -3,16 +3,17 @@ package org.eclipse.emf.compare.uml2.tests.message;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
import static com.google.common.base.Predicates.not;
-import static junit.framework.Assert.assertFalse;
-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.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.ofKind;
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.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;
import com.google.common.collect.Iterators;
@@ -26,8 +27,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.MessageChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.message.data.MessageInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -233,7 +234,7 @@ public class AddMessageTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 12 differences
- assertSame(Integer.valueOf(12), Integer.valueOf(differences.size()));
+ assertEquals(12, differences.size());
Predicate<? super Diff> addMessageDescription = null;
Predicate<? super Diff> addCoveredInMessage0Send0Description = null;
@@ -332,7 +333,7 @@ public class AddMessageTest extends AbstractUMLTest {
ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(11), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(11, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addReceiveEventInMessage));
assertTrue(addUMLMessage.getRefinedBy().contains(addSendEventInMessage));
assertTrue(addUMLMessage.getRefinedBy().contains(addCoveredInMessage0Recv0));
@@ -350,70 +351,70 @@ public class AddMessageTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(0, addMessage.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInMessage0Send0.getRequires().size()));
+ assertEquals(1, addCoveredInMessage0Send0.getRequires().size());
assertTrue(addCoveredInMessage0Send0.getRequires().contains(addMessageSend));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessageInMessage0Send0.getRequires().size()));
+ assertEquals(2, addMessageInMessage0Send0.getRequires().size());
assertTrue(addMessageInMessage0Send0.getRequires().contains(addMessageSend));
assertTrue(addMessageInMessage0Send0.getRequires().contains(addMessage));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(1, addCoveredInMessage0Recv0.getRequires().size());
assertTrue(addCoveredInMessage0Recv0.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(2, addMessageInMessage0Recv0.getRequires().size());
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessageRecv));
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessage));
- assertSame(Integer.valueOf(2), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(2, addReceiveEventInMessage.getRequires().size());
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessage));
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(2), Integer.valueOf(addSendEventInMessage.getRequires().size()));
+ assertEquals(2, addSendEventInMessage.getRequires().size());
assertTrue(addSendEventInMessage.getRequires().contains(addMessage));
assertTrue(addSendEventInMessage.getRequires().contains(addMessageSend));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline0.getRequires().size());
assertTrue(addCoveredByInLifeline0.getRequires().contains(addMessageSend));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline1.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline1.getRequires().size());
assertTrue(addCoveredByInLifeline1.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageSend.getRequires().size()));
+ assertEquals(0, addMessageSend.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(0, addMessageRecv.getRequires().size());
} else {
- assertSame(Integer.valueOf(4), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(4, addMessage.getRequires().size());
assertTrue(addMessage.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessage.getRequires().contains(addSendEventInMessage));
assertTrue(addMessage.getRequires().contains(addMessageInMessage0Recv0));
assertTrue(addMessage.getRequires().contains(addMessageInMessage0Send0));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInMessage0Send0.getRequires().size()));
+ assertEquals(0, addCoveredInMessage0Send0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageInMessage0Send0.getRequires().size()));
+ assertEquals(0, addMessageInMessage0Send0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addCoveredInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addMessageInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(0, addReceiveEventInMessage.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addSendEventInMessage.getRequires().size()));
+ assertEquals(0, addSendEventInMessage.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline1.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline1.getRequires().size());
- assertSame(Integer.valueOf(4), Integer.valueOf(addMessageSend.getRequires().size()));
+ assertEquals(4, addMessageSend.getRequires().size());
assertTrue(addMessageSend.getRequires().contains(addSendEventInMessage));
assertTrue(addMessageSend.getRequires().contains(addCoveredByInLifeline0));
assertTrue(addMessageSend.getRequires().contains(addCoveredInMessage0Send0));
assertTrue(addMessageSend.getRequires().contains(addMessageInMessage0Send0));
- assertSame(Integer.valueOf(4), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(4, addMessageRecv.getRequires().size());
assertTrue(addMessageRecv.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessageRecv.getRequires().contains(addCoveredByInLifeline1));
assertTrue(addMessageRecv.getRequires().contains(addCoveredInMessage0Recv0));
@@ -421,7 +422,7 @@ public class AddMessageTest extends AbstractUMLTest {
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(2), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(2, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Send0.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Send0.getEquivalence()
@@ -455,7 +456,7 @@ public class AddMessageTest extends AbstractUMLTest {
useFullDiffs.add(diff);
}
- assertSame(Integer.valueOf(7), Integer.valueOf(useFullDiffs.size()));
+ assertEquals(7, useFullDiffs.size());
Predicate<? super Diff> addMessageDescription = null;
Predicate<? super Diff> addCoveredInMessage0Recv0Description = null;
@@ -517,7 +518,7 @@ public class AddMessageTest extends AbstractUMLTest {
ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(6), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(6, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addReceiveEventInMessage));
assertTrue(addUMLMessage.getRefinedBy().contains(addCoveredInMessage0Recv0));
assertTrue(addUMLMessage.getRefinedBy().contains(addMessageRecv));
@@ -528,38 +529,38 @@ public class AddMessageTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(0, addMessage.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(1, addCoveredInMessage0Recv0.getRequires().size());
assertTrue(addCoveredInMessage0Recv0.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(2, addMessageInMessage0Recv0.getRequires().size());
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessageRecv));
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessage));
- assertSame(Integer.valueOf(2), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(2, addReceiveEventInMessage.getRequires().size());
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessage));
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline0.getRequires().size());
assertTrue(addCoveredByInLifeline0.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(0, addMessageRecv.getRequires().size());
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(2, addMessage.getRequires().size());
assertTrue(addMessage.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessage.getRequires().contains(addMessageInMessage0Recv0));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addCoveredInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addMessageInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(0, addReceiveEventInMessage.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline0.getRequires().size());
- assertSame(Integer.valueOf(4), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(4, addMessageRecv.getRequires().size());
assertTrue(addMessageRecv.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessageRecv.getRequires().contains(addCoveredInMessage0Recv0));
assertTrue(addMessageRecv.getRequires().contains(addMessageInMessage0Recv0));
@@ -567,7 +568,7 @@ public class AddMessageTest extends AbstractUMLTest {
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(1, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Recv0.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Recv0.getEquivalence()
@@ -595,7 +596,7 @@ public class AddMessageTest extends AbstractUMLTest {
useFullDiffs.add(diff);
}
- assertSame(Integer.valueOf(7), Integer.valueOf(useFullDiffs.size()));
+ assertEquals(7, useFullDiffs.size());
Predicate<? super Diff> addMessageDescription = null;
Predicate<? super Diff> addCoveredInMessage0Recv0Description = null;
@@ -657,7 +658,7 @@ public class AddMessageTest extends AbstractUMLTest {
ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(6), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(6, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addReceiveEventInMessage));
assertTrue(addUMLMessage.getRefinedBy().contains(addCoveredInMessage0Recv0));
assertTrue(addUMLMessage.getRefinedBy().contains(addMessageRecv));
@@ -668,38 +669,38 @@ public class AddMessageTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(0, addMessage.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(1, addCoveredInMessage0Recv0.getRequires().size());
assertTrue(addCoveredInMessage0Recv0.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(2, addMessageInMessage0Recv0.getRequires().size());
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessageRecv));
assertTrue(addMessageInMessage0Recv0.getRequires().contains(addMessage));
- assertSame(Integer.valueOf(2), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(2, addReceiveEventInMessage.getRequires().size());
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessage));
assertTrue(addReceiveEventInMessage.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(1), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(1, addCoveredByInLifeline0.getRequires().size());
assertTrue(addCoveredByInLifeline0.getRequires().contains(addMessageRecv));
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(0, addMessageRecv.getRequires().size());
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addMessage.getRequires().size()));
+ assertEquals(2, addMessage.getRequires().size());
assertTrue(addMessage.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessage.getRequires().contains(addMessageInMessage0Recv0));
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addCoveredInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMessageInMessage0Recv0.getRequires().size()));
+ assertEquals(0, addMessageInMessage0Recv0.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addReceiveEventInMessage.getRequires().size()));
+ assertEquals(0, addReceiveEventInMessage.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addCoveredByInLifeline0.getRequires().size()));
+ assertEquals(0, addCoveredByInLifeline0.getRequires().size());
- assertSame(Integer.valueOf(4), Integer.valueOf(addMessageRecv.getRequires().size()));
+ assertEquals(4, addMessageRecv.getRequires().size());
assertTrue(addMessageRecv.getRequires().contains(addReceiveEventInMessage));
assertTrue(addMessageRecv.getRequires().contains(addCoveredInMessage0Recv0));
assertTrue(addMessageRecv.getRequires().contains(addMessageInMessage0Recv0));
@@ -707,7 +708,7 @@ public class AddMessageTest extends AbstractUMLTest {
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(1), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(1, comparison.getEquivalences().size());
assertNotNull(addCoveredInMessage0Recv0.getEquivalence());
assertSame(Integer.valueOf(2), Integer.valueOf(addCoveredInMessage0Recv0.getEquivalence()
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 ee6d02c88..5fabc3b2b 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
@@ -2,11 +2,12 @@ package org.eclipse.emf.compare.uml2.tests.profiles;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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;
import com.google.common.collect.Iterators;
@@ -146,7 +147,7 @@ public class DynamicProfileTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ assertEquals(5, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -213,37 +214,37 @@ public class DynamicProfileTest extends AbstractDynamicProfileTest {
instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
// CHECK REQUIREMENT
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(0, addUMLProfileApplication.getRequires().size());
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(0, addProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
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 7eed33413..2389518e0 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
@@ -2,11 +2,12 @@ package org.eclipse.emf.compare.uml2.tests.profiles;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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;
import com.google.common.collect.Iterators;
@@ -136,7 +137,7 @@ public class StaticProfileTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 5 differences
- assertSame(Integer.valueOf(5), Integer.valueOf(differences.size()));
+ assertEquals(5, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -203,37 +204,37 @@ public class StaticProfileTest extends AbstractStaticProfileTest {
instanceOf(ProfileApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
// CHECK REQUIREMENT
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(0, addUMLProfileApplication.getRequires().size());
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(0, addProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
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 77af352b0..3a634fe9d 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
@@ -12,15 +12,16 @@ package org.eclipse.emf.compare.uml2.tests.stereotypes;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
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;
import com.google.common.collect.Iterators;
@@ -549,7 +550,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 6 differences
- assertSame(Integer.valueOf(8), Integer.valueOf(differences.size()));
+ assertEquals(8, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -633,52 +634,52 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
assertNotNull(addUMLStereotypeApplication);
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRefinedBy().size());
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(0, addProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(0, addUMLProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(1, addUMLStereotypeApplication.getRequires().size());
assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(0, addUMLStereotypeApplication.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
@@ -688,7 +689,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> addAttributeDescription = null;
@@ -710,7 +711,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
private void testAB3(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(10), Integer.valueOf(differences.size()));
+ assertEquals(10, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -805,53 +806,53 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
assertNotNull(addUMLStereotypeApplication);
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRefinedBy().size());
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(1, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addModel));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRequires().size());
assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(0, addUMLStereotypeApplication.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
}
@@ -860,7 +861,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 4 differences
- assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+ assertEquals(4, differences.size());
Predicate<? super Diff> addStereotypeApplicationDescription = null;
Predicate<? super Diff> addClassDescription = null;
@@ -891,7 +892,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 4 differences
- assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+ assertEquals(4, differences.size());
Predicate<? super Diff> changeAttributeDescription1 = null;
Predicate<? super Diff> changeAttributeDescription2 = null;
@@ -916,9 +917,9 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(changeUMLStereotypeProperty1);
assertNotNull(changeUMLStereotypeProperty2);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty1.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotypeProperty1.getRefinedBy().size());
assertTrue(changeUMLStereotypeProperty1.getRefinedBy().contains(changeAttribute1));
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty2.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotypeProperty2.getRefinedBy().size());
assertTrue(changeUMLStereotypeProperty2.getRefinedBy().contains(changeAttribute2));
testIntersections(comparison);
@@ -929,7 +930,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> addStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -951,7 +952,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(addStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(addStereotypeRef));
testIntersections(comparison);
@@ -962,7 +963,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> moveStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -979,7 +980,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(moveStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(moveStereotypeRef));
testIntersections(comparison);
@@ -990,7 +991,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1015,7 +1016,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
@@ -1025,7 +1026,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1044,7 +1045,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
@@ -1054,7 +1055,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1078,7 +1079,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
@@ -1087,7 +1088,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
private void testAB11(final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1104,7 +1105,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
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 8c2ee790c..f9944d9fb 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
@@ -12,15 +12,16 @@ package org.eclipse.emf.compare.uml2.tests.stereotypes;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.added;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
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;
import com.google.common.collect.Iterators;
@@ -692,7 +693,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 6 differences
- assertSame(Integer.valueOf(8), Integer.valueOf(differences.size()));
+ assertEquals(8, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -776,52 +777,52 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
assertNotNull(addUMLStereotypeApplication);
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRefinedBy().size());
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(0, addProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(0, addUMLProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(1, addUMLStereotypeApplication.getRequires().size());
assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(0, addUMLStereotypeApplication.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
@@ -831,7 +832,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> addAttributeDescription = null;
@@ -853,7 +854,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
private void testAB3(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(10), Integer.valueOf(differences.size()));
+ assertEquals(10, differences.size());
Predicate<? super Diff> addProfileApplicationDescription = null;
Predicate<? super Diff> addAppliedProfileInProfileApplicationDescription = null;
@@ -948,53 +949,53 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLProfileApplication);
- assertSame(Integer.valueOf(4), Integer.valueOf(addUMLProfileApplication.getRefinedBy().size()));
+ assertEquals(4, addUMLProfileApplication.getRefinedBy().size());
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addReferencesInUMLAnnotation));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addAppliedProfileInProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addProfileApplication));
assertTrue(addUMLProfileApplication.getRefinedBy().contains(addUMLAnnotation));
assertNotNull(addUMLStereotypeApplication);
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRefinedBy().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRefinedBy().size());
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addStereotypeApplication));
assertTrue(addUMLStereotypeApplication.getRefinedBy().contains(addRefBaseClass));
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(1), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(1, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addModel));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addProfileApplication));
- assertSame(Integer.valueOf(1), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(1, addReferencesInUMLAnnotation.getRequires().size());
assertTrue(addReferencesInUMLAnnotation.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
- assertSame(Integer.valueOf(2), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(2, addUMLStereotypeApplication.getRequires().size());
assertTrue(addUMLStereotypeApplication.getRequires().contains(addUMLProfileApplication));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addProfileApplication.getRequires().size()));
+ assertEquals(2, addProfileApplication.getRequires().size());
assertTrue(addProfileApplication.getRequires().contains(addAppliedProfileInProfileApplication));
assertTrue(addProfileApplication.getRequires().contains(addUMLAnnotation));
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLAnnotation.getRequires().size()));
+ assertEquals(1, addUMLAnnotation.getRequires().size());
assertTrue(addUMLAnnotation.getRequires().contains(addReferencesInUMLAnnotation));
- assertSame(Integer.valueOf(0), Integer.valueOf(addReferencesInUMLAnnotation.getRequires().size()));
+ assertEquals(0, addReferencesInUMLAnnotation.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addUMLProfileApplication.getRequires().size()));
+ assertEquals(1, addUMLProfileApplication.getRequires().size());
assertTrue(addUMLProfileApplication.getRequires().contains(addUMLStereotypeApplication));
- assertSame(Integer.valueOf(0), Integer.valueOf(addUMLStereotypeApplication.getRequires().size()));
+ assertEquals(0, addUMLStereotypeApplication.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);
}
@@ -1003,7 +1004,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 4 differences
- assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+ assertEquals(4, differences.size());
Predicate<? super Diff> addStereotypeApplicationDescription = null;
Predicate<? super Diff> addClassDescription = null;
@@ -1035,7 +1036,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 4 differences
- assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
+ assertEquals(4, differences.size());
Predicate<? super Diff> changeAttributeDescription1 = null;
Predicate<? super Diff> changeAttributeDescription2 = null;
@@ -1060,9 +1061,9 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(changeUMLStereotypeProperty1);
assertNotNull(changeUMLStereotypeProperty2);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty1.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotypeProperty1.getRefinedBy().size());
assertTrue(changeUMLStereotypeProperty1.getRefinedBy().contains(changeAttribute1));
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty2.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotypeProperty2.getRefinedBy().size());
assertTrue(changeUMLStereotypeProperty2.getRefinedBy().contains(changeAttribute2));
testIntersections(comparison);
@@ -1073,7 +1074,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> addStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1095,7 +1096,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(addStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(addStereotypeRef));
testIntersections(comparison);
@@ -1105,7 +1106,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> moveStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1122,7 +1123,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(moveStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(moveStereotypeRef));
testIntersections(comparison);
@@ -1132,7 +1133,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1157,7 +1158,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
@@ -1167,7 +1168,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1186,7 +1187,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
@@ -1196,7 +1197,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 2 differences
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertEquals(2, differences.size());
Predicate<? super Diff> changeStereotypeRefDescription = null;
Predicate<? super Diff> changeUMLStereotypeDescription = null;
@@ -1220,7 +1221,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
assertNotNull(changeStereotypeRef);
assertNotNull(changeUMLStereotype);
- assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertEquals(1, changeUMLStereotype.getRefinedBy().size());
assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
testIntersections(comparison);
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 8d4e526e3..29da910a5 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
@@ -2,15 +2,16 @@ package org.eclipse.emf.compare.uml2.tests.timeConstraint;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
-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.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.ofKind;
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;
import com.google.common.collect.Iterators;
@@ -22,8 +23,8 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.uml2.internal.IntervalConstraintChange;
-import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
import org.eclipse.emf.compare.uml2.tests.timeConstraint.data.TimeConstraintInputData;
import org.eclipse.emf.ecore.resource.Resource;
import org.junit.Test;
@@ -85,7 +86,7 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
final List<Diff> differences = comparison.getDifferences();
// We should have no less and no more than 10 differences
- assertSame(Integer.valueOf(10), Integer.valueOf(differences.size()));
+ assertEquals(10, differences.size());
Predicate<? super Diff> addTimeConstraintDescription = null;
Predicate<? super Diff> addTimeIntervalDescription = null;
@@ -163,7 +164,7 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
instanceOf(IntervalConstraintChange.class), ofKind(DifferenceKind.DELETE)));
}
assertNotNull(addUMLMessage);
- assertSame(Integer.valueOf(9), Integer.valueOf(addUMLMessage.getRefinedBy().size()));
+ assertEquals(9, addUMLMessage.getRefinedBy().size());
assertTrue(addUMLMessage.getRefinedBy().contains(addConstrainedElementInTimeConstraint));
assertTrue(addUMLMessage.getRefinedBy().contains(addTimeInterval));
assertTrue(addUMLMessage.getRefinedBy().contains(addMinInTimeInterval));
@@ -177,63 +178,63 @@ public class AddTimeConstraintTest extends AbstractUMLTest {
// CHECK REQUIREMENT
if (kind.equals(TestKind.ADD)) {
- assertSame(Integer.valueOf(0), Integer.valueOf(addTimeConstraint.getRequires().size()));
+ assertEquals(0, addTimeConstraint.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addTimeInterval.getRequires().size()));
+ assertEquals(1, addTimeInterval.getRequires().size());
assertTrue(addTimeInterval.getRequires().contains(addTimeConstraint));
- assertSame(Integer.valueOf(0), Integer.valueOf(addTimeExpressionMin.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addTimeExpressionMax.getRequires().size()));
+ assertEquals(0, addTimeExpressionMin.getRequires().size());
+ assertEquals(0, addTimeExpressionMax.getRequires().size());
- assertSame(Integer.valueOf(1), Integer.valueOf(addMinValue.getRequires().size()));
+ assertEquals(1, addMinValue.getRequires().size());
assertTrue(addMinValue.getRequires().contains(addTimeExpressionMin));
- assertSame(Integer.valueOf(1), Integer.valueOf(addMaxValue.getRequires().size()));
+ assertEquals(1, addMaxValue.getRequires().size());
assertTrue(addMaxValue.getRequires().contains(addTimeExpressionMax));
assertSame(Integer.valueOf(1), Integer.valueOf(addConstrainedElementInTimeConstraint
.getRequires().size()));
assertTrue(addTimeInterval.getRequires().contains(addTimeConstraint));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMinInTimeInterval.getRequires().size()));
+ assertEquals(2, addMinInTimeInterval.getRequires().size());
assertTrue(addMinInTimeInterval.getRequires().contains(addTimeInterval));
assertTrue(addMinInTimeInterval.getRequires().contains(addTimeExpressionMin));
- assertSame(Integer.valueOf(2), Integer.valueOf(addMaxInTimeInterval.getRequires().size()));
+ assertEquals(2, addMaxInTimeInterval.getRequires().size());
assertTrue(addMaxInTimeInterval.getRequires().contains(addTimeInterval));
assertTrue(addMaxInTimeInterval.getRequires().contains(addTimeExpressionMax));
} else {
- assertSame(Integer.valueOf(2), Integer.valueOf(addTimeConstraint.getRequires().size()));
+ assertEquals(2, addTimeConstraint.getRequires().size());
assertTrue(addTimeConstraint.getRequires().contains(addConstrainedElementInTimeConstraint));
assertTrue(addTimeConstraint.getRequires().contains(addTimeInterval));
- assertSame(Integer.valueOf(2), Integer.valueOf(addTimeInterval.getRequires().size()));
+ assertEquals(2, addTimeInterval.getRequires().size());
assertTrue(addTimeInterval.getRequires().contains(addMinInTimeInterval));
assertTrue(addTimeInterval.getRequires().contains(addMaxInTimeInterval));
- assertSame(Integer.valueOf(2), Integer.valueOf(addTimeExpressionMin.getRequires().size()));
+ assertEquals(2, addTimeExpressionMin.getRequires().size());
assertTrue(addTimeExpressionMin.getRequires().contains(addMinValue));
assertTrue(addTimeExpressionMin.getRequires().contains(addMinInTimeInterval));
- assertSame(Integer.valueOf(2), Integer.valueOf(addTimeExpressionMax.getRequires().size()));
+ assertEquals(2, addTimeExpressionMax.getRequires().size());
assertTrue(addTimeExpressionMax.getRequires().contains(addMaxValue));
assertTrue(addTimeExpressionMax.getRequires().contains(addMaxInTimeInterval));
- assertSame(Integer.valueOf(0), Integer.valueOf(addMinValue.getRequires().size()));
+ assertEquals(0, addMinValue.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMaxValue.getRequires().size()));
+ assertEquals(0, addMaxValue.getRequires().size());
assertSame(Integer.valueOf(0), Integer.valueOf(addConstrainedElementInTimeConstraint
.getRequires().size()));
- assertSame(Integer.valueOf(0), Integer.valueOf(addMinInTimeInterval.getRequires().size()));
+ assertEquals(0, addMinInTimeInterval.getRequires().size());
- assertSame(Integer.valueOf(0), Integer.valueOf(addMaxInTimeInterval.getRequires().size()));
+ assertEquals(0, addMaxInTimeInterval.getRequires().size());
}
// CHECK EQUIVALENCE
- assertSame(Integer.valueOf(0), Integer.valueOf(comparison.getEquivalences().size()));
+ assertEquals(0, comparison.getEquivalences().size());
testIntersections(comparison);

Back to the top