Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.compare.rcp.ui.tests/src')
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupWithRefinedDiffTestScenario.java25
2 files changed, 29 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupTest.java b/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupTest.java
index 9e064ff72..b3947caf2 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupTest.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupTest.java
@@ -32,8 +32,8 @@ import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.filters.Stru
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.filters.impl.TechnicalitiesFilter;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.BasicDifferenceGroupImpl;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.ThreeWayComparisonGroupProvider;
+import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.ThreeWayComparisonGroupProvider.CompositeConflict;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.ThreeWayComparisonGroupProvider.ConflictsGroupImpl;
-import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.ThreeWayComparisonGroupProvider.ConflictsGroupImpl.CompositeConflict;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.nodes.ConflictNode;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.nodes.DiffNode;
import org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.nodes.MatchNode;
@@ -355,7 +355,7 @@ public class ConflictsGroupTest extends AbstractTestTreeNodeItemProviderAdapter
* href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=501864"</a>
*/
@Test
- public void testRefinedDiffsWithOnlyOnePseudoConflictAreInConflictGroupAndDiffGroup() {
+ public void testRefinedDiffsWithOnlyOnePseudoConflictAreInDiffGroupOnly() {
ConflictsGroupWithRefinedDiffTestScenario scenario = new ConflictsGroupWithRefinedDiffTestScenario();
// Create pseudo conflict
@@ -403,7 +403,7 @@ public class ConflictsGroupTest extends AbstractTestTreeNodeItemProviderAdapter
assertEquals(1, diffNodesLeftFiltered.size());
final List<? extends TreeNode> subDiffNodesLeftFiltered = applyTechnicalitiesFilter(
diffNodesLeftFiltered.get(0).getChildren());
- assertEquals(1, subDiffNodesLeftFiltered.size());
+ assertEquals(2, subDiffNodesLeftFiltered.size());
// Build right side
final BasicDifferenceGroupImpl rightSide = buildDifferenceGroup(scenario.comparison,
@@ -422,7 +422,7 @@ public class ConflictsGroupTest extends AbstractTestTreeNodeItemProviderAdapter
assertEquals(1, diffNodesRightFiltered.size());
final List<? extends TreeNode> subDiffNodesRightFiltered = applyTechnicalitiesFilter(
diffNodesRightFiltered.get(0).getChildren());
- assertEquals(1, subDiffNodesRightFiltered.size());
+ assertEquals(2, subDiffNodesRightFiltered.size());
}
/**
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupWithRefinedDiffTestScenario.java b/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupWithRefinedDiffTestScenario.java
index e271b0288..95f973a3c 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupWithRefinedDiffTestScenario.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui.tests/src/org/eclipse/emf/compare/rcp/ui/tests/structuremergeviewer/groups/ConflictsGroupWithRefinedDiffTestScenario.java
@@ -19,6 +19,23 @@ import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceSource;
import org.eclipse.emf.compare.Match;
+/**
+ * This test scenario creates a comparison like this:
+ * <ul>
+ * <li>diff1 (LEFT), refined by
+ * <ul>
+ * <li>diff1a (LEFT)</li>
+ * <li>diff1b (RIGHT)</li>
+ * </ul>
+ * </li>
+ * <li>diff2 (RIGHT), refined by
+ * <ul>
+ * <li>diff2a (LEFT)</li>
+ * <li>diff2b (RIGHT)</li>
+ * </ul>
+ * </li>
+ * </ul>
+ */
public class ConflictsGroupWithRefinedDiffTestScenario {
private static final CompareFactory FACTORY = CompareFactory.eINSTANCE;
@@ -73,6 +90,14 @@ public class ConflictsGroupWithRefinedDiffTestScenario {
comparison.getMatches().add(match1);
}
+ /**
+ * Add a conflict between 2 existing differences of this scenario's comparison.
+ *
+ * @param conflictingDiff1
+ * @param conflictingDiff2
+ * @param kind
+ * @return The created conflict.
+ */
Conflict addConflict(Diff conflictingDiff1, Diff conflictingDiff2, ConflictKind kind) {
final Conflict conflict = FACTORY.createConflict();
conflict.getDifferences().add(conflictingDiff1);

Back to the top