Skip to content

Commit

Permalink
Add CloseTestWindowsRule
Browse files Browse the repository at this point in the history
To remaining tests identified. Fixes
eclipse-platform#2615
  • Loading branch information
akurtakov committed Dec 20, 2024
1 parent 61cca8f commit 24c36fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
import org.eclipse.ui.menus.IContributionRoot;
import org.eclipse.ui.menus.IMenuService;
import org.eclipse.ui.services.IServiceLocator;
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
import org.eclipse.ui.tests.harness.util.UITestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;

public class MenusTest {
Expand All @@ -42,6 +44,9 @@ public class MenusTest {
private IMenuService service;
private Set<String> enabledActivities;

@Rule
public CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();

/**
* @since 3.3
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.tests.api.MockViewPart;
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
import org.eclipse.ui.tests.harness.util.FileUtil;
import org.eclipse.ui.tests.harness.util.UITestCase;
import org.junit.Rule;
import org.junit.Test;

/**
Expand All @@ -48,6 +50,9 @@ public class PartContextTest {

public static final String WINDOW_CONTEXT_ID = "org.eclipse.ui.tests.contexts.WorkbenchWindow";

@Rule
public CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();

@Test
public void testBasicContextActivation() throws Exception {
IContextService globalService = getWorkbench()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
import org.eclipse.ui.tests.harness.util.FileUtil;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

/**
Expand All @@ -56,6 +58,8 @@ public class OpenCloseTest {
private IWorkbench workbench;
private IWorkbenchPage page;

@Rule
public CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();

@Before
public void setup() {
Expand Down

0 comments on commit 24c36fe

Please sign in to comment.