Skip to content

Commit

Permalink
StackRendererTest should restet the model after each test
Browse files Browse the repository at this point in the history
StackRendererTest should remove the used window before each test
Before this change the the model
elements were not removed after a test.
  • Loading branch information
vogella authored and HannesWell committed Sep 29, 2024
1 parent 8a8979f commit 323ea9c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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;
Expand Down Expand Up @@ -86,11 +87,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
Expand Down

0 comments on commit 323ea9c

Please sign in to comment.