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 Jul 26, 2023
1 parent 1621d6e commit c7e1056
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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 @@ -84,11 +85,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 c7e1056

Please sign in to comment.