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 marcushoepfner committed Dec 13, 2023
1 parent 9029bea commit 39a8a86
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,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 @@ -85,11 +86,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 39a8a86

Please sign in to comment.