Search in sources :

Example 1 with Eclipse

use of org.eclipse.egit.ui.test.Eclipse in project egit by eclipse.

the class GlobalConfigurationPageTest method afterTest.

@AfterClass
public static void afterTest() throws Exception {
    configFile.delete();
    SystemReader.setInstance(null);
    // reset saved preferences state
    SWTBotShell preferencePage = new Eclipse().openPreferencePage(null);
    preferencePage.bot().tree(0).getTreeItem("General").select();
    preferencePage.bot().button(IDialogConstants.OK_LABEL).click();
    TestUtil.processUIEvents();
}
Also used : Eclipse(org.eclipse.egit.ui.test.Eclipse) SWTBotShell(org.eclipse.swtbot.swt.finder.widgets.SWTBotShell) AfterClass(org.junit.AfterClass)

Example 2 with Eclipse

use of org.eclipse.egit.ui.test.Eclipse in project egit by eclipse.

the class LocalRepositoryTestCase method resetWorkspace.

@After
public void resetWorkspace() throws Exception {
    TestUtil.processUIEvents();
    // close all editors/dialogs
    new Eclipse().reset();
    closeGitViews();
    TestUtil.processUIEvents();
    // cleanup
    for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
        project.delete(false, false, null);
    }
    shutDownRepositories();
    TestUtil.waitForJobs(50, 5000);
}
Also used : Eclipse(org.eclipse.egit.ui.test.Eclipse) IProject(org.eclipse.core.resources.IProject) After(org.junit.After)

Example 3 with Eclipse

use of org.eclipse.egit.ui.test.Eclipse in project egit by eclipse.

the class SharingWizardTest method after.

@After
public void after() throws Exception {
    Set<File> d = new TreeSet<File>();
    erase(projectName0, d);
    erase(projectName1, d);
    erase(projectName2, d);
    erase(projectName3, d);
    for (File f : d) if (f.exists())
        FileUtils.delete(f, FileUtils.RECURSIVE);
    ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
    new Eclipse().reset();
}
Also used : TreeSet(java.util.TreeSet) Eclipse(org.eclipse.egit.ui.test.Eclipse) File(java.io.File) After(org.junit.After)

Aggregations

Eclipse (org.eclipse.egit.ui.test.Eclipse)3 After (org.junit.After)2 File (java.io.File)1 TreeSet (java.util.TreeSet)1 IProject (org.eclipse.core.resources.IProject)1 SWTBotShell (org.eclipse.swtbot.swt.finder.widgets.SWTBotShell)1 AfterClass (org.junit.AfterClass)1