From 8f3c1e108e653b15b7e4f4ea39e6f1a486937306 Mon Sep 17 00:00:00 2001 From: Michael Valenta Date: Mon, 8 Sep 2003 20:56:16 +0000 Subject: *** empty log message *** --- .../tests/ccvs/ui/unit/CheckoutOperationTests.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java index 47058de5f..1724d6a46 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java @@ -20,6 +20,7 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Path; import org.eclipse.team.core.TeamException; +import org.eclipse.team.internal.ccvs.core.CVSException; import org.eclipse.team.internal.ccvs.core.ICVSFolder; import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder; import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot; @@ -61,8 +62,7 @@ public class CheckoutOperationTests extends EclipseTest { null /* shell */, new ICVSRemoteFolder[] { (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(movedProject) }, null /*target location*/); - op.setCVSRunnableContext(new HeadlessCVSRunnableContext()); - op.run(); + run(op); } catch (InterruptedException e) { fail("Operation should not have been interrupted"); } @@ -79,8 +79,7 @@ public class CheckoutOperationTests extends EclipseTest { null /* shell */, new ICVSRemoteFolder[] { (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder1")) }, null /*target location*/); - op.setCVSRunnableContext(new HeadlessCVSRunnableContext()); - op.run(); + run(op); } catch (InterruptedException e) { fail("Operation should not have been interrupted"); } @@ -116,8 +115,7 @@ public class CheckoutOperationTests extends EclipseTest { (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(movedProject2) }, null /*target location*/); - op.setCVSRunnableContext(new HeadlessCVSRunnableContext()); - op.run(); + run(op); } catch (InterruptedException e) { fail("Operation should not have been interrupted"); } @@ -135,12 +133,16 @@ public class CheckoutOperationTests extends EclipseTest { copy, null /*target location*/, false); - op.setCVSRunnableContext(new HeadlessCVSRunnableContext()); - op.run(); + run(op); } catch (InterruptedException e) { fail("Operation should not have been interrupted"); } assertEquals(project, copy); } + + private void run(CVSOperation op) throws CVSException, InterruptedException { + op.setCVSRunnableContext(new HeadlessCVSRunnableContext()); + op.run(); + } } -- cgit v1.2.3