Skip to content

Commit

Permalink
[565568] [Filtering] Fixed failed test
Browse files Browse the repository at this point in the history
Bug 565568

Change-Id: If9fbf0b0141e04721a9236c0d66f35a00a378644
Signed-off-by: Ali AKAR <[email protected]>
  • Loading branch information
aliakar82 authored and minhtutonthat committed Aug 6, 2020
1 parent 8b7fbbf commit 86f6816
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018 THALES GLOBAL SERVICES.
* Copyright (c) 2018, 2020 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -17,6 +17,7 @@
import java.util.Set;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
import org.polarsys.capella.core.data.la.LaFactory;
import org.polarsys.capella.core.data.la.LogicalComponent;
import org.polarsys.capella.filtering.ComposedFilteringResult;
Expand All @@ -41,6 +42,7 @@ public class FilteringUtilsTest extends BasicTestCase {
@Override
public void setUp() throws Exception {
super.setUp();

criteria1 = FilteringFactory.eINSTANCE.createFilteringCriterion();
criteria1.setName("criteria1");
criteria2 = FilteringFactory.eINSTANCE.createFilteringCriterion();
Expand All @@ -64,6 +66,10 @@ public void setUp() throws Exception {
RootLC = LaFactory.eINSTANCE.createLogicalComponent("RootLC");

RootLC.getOwnedLogicalComponents().addAll(ALL_LCs);

// Create a Resource just to make CapellaAdapterHelper#resolveEObject(Object, boolean, boolean) works properly.
ResourceImpl resource = new ResourceImpl();
resource.getContents().add(RootLC);

R1 = createResultWithCriteria("R1", Arrays.asList(criteria1, criteria2));
R2 = createResultWithCriteria("R2", Arrays.asList(criteria2, criteria3));
Expand Down

0 comments on commit 86f6816

Please sign in to comment.