diff options
author | Tomasz Zarna | 2010-02-11 11:09:06 +0000 |
---|---|---|
committer | Tomasz Zarna | 2010-02-11 11:09:06 +0000 |
commit | f5f845063871488d55e4f36940af66209483e969 (patch) | |
tree | 9e290dc92e677a13808dc96975ba35fb268f9638 /tests | |
parent | c9f2fee96a885fa76e16eb790b70389b55a28a8f (diff) | |
download | eclipse.platform.team-f5f845063871488d55e4f36940af66209483e969.tar.gz eclipse.platform.team-f5f845063871488d55e4f36940af66209483e969.tar.xz eclipse.platform.team-f5f845063871488d55e4f36940af66209483e969.zip |
bug 298925: [NPE] NullPointerException on import psf action
Diffstat (limited to 'tests')
-rw-r--r-- | tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java index 0dee1752c..1ed147833 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ProjectSetImporterTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation and others. + * Copyright (c) 2007, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,11 @@ import junit.framework.TestSuite; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.widgets.Display; +import org.eclipse.team.core.ProjectSetCapability; +import org.eclipse.team.core.ProjectSetSerializationContext; +import org.eclipse.team.core.RepositoryProviderType; import org.eclipse.team.core.TeamException; +import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin; import org.eclipse.team.internal.ui.ProjectSetImporter; public class ProjectSetImporterTests extends EclipseTest { @@ -192,4 +196,23 @@ public class ProjectSetImporterTests extends EclipseTest { out.close(); } } + + public void testBug298925_noToAll() throws TeamException, CoreException { + IProject project = createProject("ProjectSetImporterTests", + new String[0]); + String[] referenceStrings = new String[] { "1.0," + + CVSTestSetup.REPOSITORY_LOCATION + "," + project.getName() /* module */ + + psf_1 + project.getName() /* project */}; + RepositoryProviderType type = RepositoryProviderType + .getProviderType(CVSProviderPlugin.getTypeId()); + ProjectSetCapability c = type.getProjectSetCapability(); + /* + * ProjectSetSerializationContext.confirmOverwrite gives the same result + * as UIProjectSetSerializationContext when there is no project to + * overwrite ('No to All' selected). + */ + c.addToWorkspace(referenceStrings, + new ProjectSetSerializationContext(), null); + // If we got here and no NPE was thrown, we're good. + } } |