Descriptive test name for PartRenderingEngine test from Bug 298415
Change-Id: Id17998f6c43450f87334e36f42ecf904b68d88e7
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
index 591501f..df9ab61 100644
--- a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
+++ b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
@@ -201,18 +201,17 @@
}
@Test
- public void testCreateViewBug298415() {
- final MWindow window = createWindowWithOneView("Part Name");
+ public void ensureRemovalOfWindowDoesNotResultInExceptionBug298415() {
MApplication application = ems.createModelElement(MApplication.class);
- application.getChildren().add(window);
application.setContext(appContext);
+ MWindow window = createWindowWithOneView("Part Name");
+ application.getChildren().add(window);
appContext.set(MApplication.class, application);
wb = new E4Workbench(application, appContext);
wb.createAndRunUI(window);
- MPartSashContainer container = (MPartSashContainer) window
- .getChildren().get(0);
+ MPartSashContainer container = (MPartSashContainer) window.getChildren().get(0);
MPartStack stack = (MPartStack) container.getChildren().get(0);
MPart part = (MPart) stack.getChildren().get(0);
@@ -220,9 +219,7 @@
renderer.removeGui(part);
renderer.removeGui(window);
- while (Display.getCurrent().readAndDispatch()) {
- // spin the event loop
- }
+ spinEventLoop();
}
@Test