Skip to content

Commit

Permalink
Find/Replace: align test class packages with production class packages
Browse files Browse the repository at this point in the history
This moves the test classes for the find/replace functionality, in
particular the ones for the find/replace overlay, to the packages
according to those of the production classes.
  • Loading branch information
HeikoKlare committed Jul 1, 2024
1 parent a15aafd commit 15d2e1d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
package org.eclipse.ui.internal.findandreplace;

import org.eclipse.swt.widgets.Display;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
package org.eclipse.ui.internal.findandreplace;

import static org.eclipse.ui.workbench.texteditor.tests.FindReplaceTestUtil.runEventQueue;
import static org.eclipse.ui.internal.findandreplace.FindReplaceTestUtil.runEventQueue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
Expand All @@ -34,7 +34,8 @@
import org.eclipse.jface.text.TextViewer;

import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

import org.eclipse.ui.workbench.texteditor.tests.ScreenshotTest;

public abstract class FindReplaceUITest<AccessType extends IFindReplaceUIAccess> {
@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
package org.eclipse.ui.internal.findandreplace;

import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;

import org.eclipse.jface.text.IFindReplaceTarget;

import org.eclipse.ui.internal.findandreplace.IFindReplaceLogic;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

/**
* Wraps UI access for different find/replace UIs
*/
interface IFindReplaceUIAccess {
public interface IFindReplaceUIAccess {

IFindReplaceTarget getTarget();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Contributors:
* Vector Informatik GmbH - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
package org.eclipse.ui.internal.findandreplace.overlay;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
Expand All @@ -28,6 +28,7 @@
import org.eclipse.jface.text.IFindReplaceTarget;
import org.eclipse.jface.text.TextViewer;

import org.eclipse.ui.internal.findandreplace.FindReplaceUITest;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

public class FindReplaceOverlayTest extends FindReplaceUITest<OverlayAccess> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Contributors:
* Vector Informatik GmbH - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
package org.eclipse.ui.internal.findandreplace.overlay;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand All @@ -36,7 +36,9 @@
import org.eclipse.jface.text.IFindReplaceTargetExtension;

import org.eclipse.ui.internal.findandreplace.FindReplaceLogic;
import org.eclipse.ui.internal.findandreplace.FindReplaceTestUtil;
import org.eclipse.ui.internal.findandreplace.IFindReplaceLogic;
import org.eclipse.ui.internal.findandreplace.IFindReplaceUIAccess;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

class OverlayAccess implements IFindReplaceUIAccess {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;

import static org.eclipse.ui.workbench.texteditor.tests.FindReplaceTestUtil.runEventQueue;
import static org.eclipse.ui.internal.findandreplace.FindReplaceTestUtil.runEventQueue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.not;
Expand All @@ -35,6 +35,7 @@

import org.eclipse.ui.internal.findandreplace.FindReplaceLogic;
import org.eclipse.ui.internal.findandreplace.IFindReplaceLogic;
import org.eclipse.ui.internal.findandreplace.IFindReplaceUIAccess;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

class DialogAccess implements IFindReplaceUIAccess {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;

import static org.eclipse.ui.workbench.texteditor.tests.FindReplaceTestUtil.runEventQueue;
import static org.eclipse.ui.internal.findandreplace.FindReplaceTestUtil.runEventQueue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
Expand All @@ -36,6 +36,7 @@
import org.eclipse.jface.text.IFindReplaceTarget;
import org.eclipse.jface.text.TextViewer;

import org.eclipse.ui.internal.findandreplace.FindReplaceUITest;
import org.eclipse.ui.internal.findandreplace.SearchOptions;

public class FindReplaceDialogTest extends FindReplaceUITest<DialogAccess> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.junit.runners.Suite.SuiteClasses;

import org.eclipse.ui.internal.findandreplace.FindReplaceLogicTest;
import org.eclipse.ui.internal.findandreplace.overlay.FindReplaceOverlayTest;

import org.eclipse.ui.workbench.texteditor.tests.minimap.MinimapPageTest;
import org.eclipse.ui.workbench.texteditor.tests.minimap.MinimapWidgetTest;
Expand Down

0 comments on commit 15d2e1d

Please sign in to comment.