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 committed May 9, 2023
1 parent 880dc37 commit 747ad3f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 747ad3f

Please sign in to comment.