Skip to content

Commit f9b743f

Browse files
committed
StackRendererTest should restet the model after each test
StackRendererTest should remove the used window before each test Before this change the the model elements were not removed after a test.
1 parent a4a2fde commit f9b743f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import org.eclipse.swt.widgets.Event;
6060
import org.eclipse.swt.widgets.Label;
6161
import org.eclipse.swt.widgets.Widget;
62+
import org.junit.After;
6263
import org.junit.Before;
6364
import org.junit.Rule;
6465
import org.junit.Test;
@@ -86,11 +87,16 @@ public class StackRendererTest {
8687
@Before
8788
public void setUp() throws Exception {
8889
window = ems.createModelElement(MWindow.class);
90+
partStack = ems.createModelElement(MPartStack.class);
91+
window.getChildren().add(partStack);
8992
application.getChildren().add(window);
9093
application.setSelectedElement(window);
94+
}
9195

92-
partStack = ems.createModelElement(MPartStack.class);
93-
window.getChildren().add(partStack);
96+
@After
97+
public void cleanUp() throws Exception {
98+
ems.deleteModelElement(partStack);
99+
ems.deleteModelElement(window);
94100
}
95101

96102
@Test

0 commit comments

Comments
 (0)