diff --git a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java index db6ce1d48e1..becae422db9 100644 --- a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java +++ b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java @@ -54,6 +54,7 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Widget; +import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -81,11 +82,16 @@ public class StackRendererTest { @Before public void setUp() throws Exception { window = ems.createModelElement(MWindow.class); + partStack = ems.createModelElement(MPartStack.class); + window.getChildren().add(partStack); application.getChildren().add(window); application.setSelectedElement(window); + } - partStack = ems.createModelElement(MPartStack.class); - window.getChildren().add(partStack); + @After + public void cleanUp() throws Exception { + ems.deleteModelElement(partStack); + ems.deleteModelElement(window); } @Test