Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-03-19 18:14:33 -0500
committerJean Michel-Lemieux2002-03-19 18:14:33 -0500
commite80fa2ef668c2e9d0db6ab34e9fb42804aff0ac7 (patch)
treef988c48e9a929ebef6b4d190f0b1d3834c2f5b2d
parent5ad819f0be3fc59b95dd72fba69ff084a34f7fed (diff)
downloadeclipse.platform.team-e80fa2ef668c2e9d0db6ab34e9fb42804aff0ac7.tar.gz
eclipse.platform.team-e80fa2ef668c2e9d0db6ab34e9fb42804aff0ac7.tar.xz
eclipse.platform.team-e80fa2ef668c2e9d0db6ab34e9fb42804aff0ac7.zip
*** empty log message ***
-rw-r--r--tests/org.eclipse.team.tests.core/.classpath16
-rw-r--r--tests/org.eclipse.team.tests.core/.project17
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java28
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java28
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java28
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java47
6 files changed, 159 insertions, 5 deletions
diff --git a/tests/org.eclipse.team.tests.core/.classpath b/tests/org.eclipse.team.tests.core/.classpath
index 11498fa38..6a4f509e0 100644
--- a/tests/org.eclipse.team.tests.core/.classpath
+++ b/tests/org.eclipse.team.tests.core/.classpath
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="/org.apache.xerces"/>
<classpathentry kind="src" path="/org.eclipse.core.tests.harness"/>
+ <classpathentry kind="src" path="/org.eclipse.core.resources"/>
+ <classpathentry kind="src" path="/org.eclipse.team.core"/>
+ <classpathentry kind="src" path="/org.eclipse.team.cvs.core"/>
+ <classpathentry kind="src" path="/org.eclipse.team.ui"/>
+ <classpathentry kind="src" path="/org.eclipse.team.cvs.ui"/>
+ <classpathentry kind="src" path="/org.eclipse.compare"/>
+ <classpathentry kind="src" path="/org.eclipse.ui"/>
<classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/org.eclipse.team.tests.core/.project b/tests/org.eclipse.team.tests.core/.project
index 9fb360c1d..3126885eb 100644
--- a/tests/org.eclipse.team.tests.core/.project
+++ b/tests/org.eclipse.team.tests.core/.project
@@ -3,10 +3,16 @@
<name>org.eclipse.team.tests.core</name>
<comment></comment>
<projects>
+ <project>org.apache.xerces</project>
+ <project>org.eclipse.compare</project>
<project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
<project>org.eclipse.core.tests.harness</project>
<project>org.eclipse.team.core</project>
+ <project>org.eclipse.team.cvs.core</project>
+ <project>org.eclipse.team.cvs.ui</project>
+ <project>org.eclipse.team.ui</project>
+ <project>org.eclipse.ui</project>
<project>org.junit</project>
</projects>
<buildSpec>
@@ -15,9 +21,20 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.team.cvs.core.cvsnature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
new file mode 100644
index 000000000..3db32af1b
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
@@ -0,0 +1,28 @@
+package org.eclipse.team.tests.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.core.RepositoryProvider;
+
+public class RepositoryProviderBic extends RepositoryProvider {
+
+ final public static String NATURE_ID = "org.eclipse.team.tests.core.bic-provider";
+
+ /*
+ * @see RepositoryProvider#configureProject()
+ */
+ public void configureProject() throws CoreException {
+ }
+
+ /*
+ * @see RepositoryProvider#getID()
+ */
+ public String getID() {
+ return NATURE_ID;
+ }
+ /*
+ * @see IProjectNature#deconfigure()
+ */
+ public void deconfigure() throws CoreException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
new file mode 100644
index 000000000..d1e08e095
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
@@ -0,0 +1,28 @@
+package org.eclipse.team.tests.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.core.RepositoryProvider;
+
+public class RepositoryProviderNaish extends RepositoryProvider {
+
+ final public static String NATURE_ID = "org.eclipse.team.tests.core.naish-provider";
+
+ /*
+ * @see RepositoryProvider#configureProject()
+ */
+ public void configureProject() throws CoreException {
+ }
+
+ /*
+ * @see RepositoryProvider#getID()
+ */
+ public String getID() {
+ return NATURE_ID;
+ }
+ /*
+ * @see IProjectNature#deconfigure()
+ */
+ public void deconfigure() throws CoreException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
new file mode 100644
index 000000000..b2fdfa9f7
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
@@ -0,0 +1,28 @@
+package org.eclipse.team.tests.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.core.RepositoryProvider;
+
+public class RepositoryProviderOtherSport extends RepositoryProvider {
+
+ final public static String NATURE_ID = "org.eclipse.team.tests.core.other";
+
+ /*
+ * @see RepositoryProvider#configureProject()
+ */
+ public void configureProject() throws CoreException {
+ }
+
+ /*
+ * @see RepositoryProvider#getID()
+ */
+ public String getID() {
+ return NATURE_ID;
+ }
+ /*
+ * @see IProjectNature#deconfigure()
+ */
+ public void deconfigure() throws CoreException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
new file mode 100644
index 000000000..b81990a64
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
@@ -0,0 +1,47 @@
+package org.eclipse.team.tests.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.team.core.TeamException;
+
+public class RepositoryProviderTests extends TeamTest {
+ public RepositoryProviderTests() {
+ super();
+ }
+
+ public RepositoryProviderTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(RepositoryProviderTests.class);
+ return new TestSetup(suite);
+ //return new testSetup(new RepositoryProviderTests("test"));
+ }
+
+ public void testProvidersRegistered() throws CoreException, TeamException {
+ List repoProviderIds = new ArrayList(Arrays.asList(RepositoryProvider.getAllProviderTypeIds()));
+ assertEquals(true, repoProviderIds.contains(RepositoryProviderBic.NATURE_ID));
+ assertEquals(true, repoProviderIds.contains(RepositoryProviderNaish.NATURE_ID));
+ assertEquals(false, repoProviderIds.contains(RepositoryProviderOtherSport.NATURE_ID));
+ }
+
+ public void testGetProviderGeneric() throws CoreException, TeamException {
+ IProject project = getUniqueTestProject("testGetProviderGeneric");
+
+ // test that adding a non-team nature will not return a provider
+ RepositoryProvider.addNatureToProject(project, RepositoryProviderOtherSport.NATURE_ID, null);
+ assertTrue(RepositoryProvider.getProvider(project) == null);
+
+ // adding a valid team provider should be fine
+ //RepositoryProvider.addNatureToProject(project, RepositoryProvider);
+ }
+}

Back to the top