Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-03-19 14:15:04 -0500
committerJean Michel-Lemieux2002-03-19 14:15:04 -0500
commit9360e5c55ff94b80b043b2c9c063f1fe650b7be2 (patch)
tree8a18956e90c055b4cd1493a2082efd39cc61b40a
parentc5c32cc7e6dac5e905f2f88e8af008ad5ef5cea7 (diff)
downloadeclipse.platform.team-9360e5c55ff94b80b043b2c9c063f1fe650b7be2.tar.gz
eclipse.platform.team-9360e5c55ff94b80b043b2c9c063f1fe650b7be2.tar.xz
eclipse.platform.team-9360e5c55ff94b80b043b2c9c063f1fe650b7be2.zip
Initial release
-rw-r--r--tests/org.eclipse.team.tests.core/.classpath11
-rw-r--r--tests/org.eclipse.team.tests.core/.project23
-rw-r--r--tests/org.eclipse.team.tests.core/build.properties2
-rw-r--r--tests/org.eclipse.team.tests.core/plugin.xml50
-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.java37
-rw-r--r--tests/org.eclipse.team.tests.core/test.xml59
9 files changed, 266 insertions, 0 deletions
diff --git a/tests/org.eclipse.team.tests.core/.classpath b/tests/org.eclipse.team.tests.core/.classpath
new file mode 100644
index 000000000..563764820
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path=""/>
+ <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="/org.eclipse.core.tests.harness"/>
+ <classpathentry kind="src" path="/org.junit"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/tests/org.eclipse.team.tests.core/.project b/tests/org.eclipse.team.tests.core/.project
new file mode 100644
index 000000000..9fb360c1d
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.team.tests.core</name>
+ <comment></comment>
+ <projects>
+ <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.junit</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.team.cvs.core.cvsnature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.team.tests.core/build.properties b/tests/org.eclipse.team.tests.core/build.properties
new file mode 100644
index 000000000..eb53c7650
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/build.properties
@@ -0,0 +1,2 @@
+source.cvstests.jar=src/
+bin.includes=about.html,plugin.xml,*.jar,test.xml,repository.properties \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/plugin.xml b/tests/org.eclipse.team.tests.core/plugin.xml
new file mode 100644
index 000000000..dccb40e73
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/plugin.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin
+ name="Eclipse Team Core Tests"
+ id="org.eclipse.team.tests.core"
+ version="1.0"
+ provider-name="Object Technology International, Inc.">
+
+ <requires>
+ <import plugin="org.apache.xerces"/>
+ <import plugin="org.eclipse.core.tests.harness"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.team.core"/>
+ <import plugin="org.junit"/>
+ </requires>
+
+ <runtime>
+ <library name="teamtests.jar">
+ <export name="*"/>
+ </library>
+ </runtime>
+
+ <extension point="org.eclipse.core.tests.harness.tests">
+ <test id="team.all">
+ <run class="org.eclipse.team.tests.core.RepositoryProviderTests"/>
+ </test>
+ </extension>
+
+<extension point="org.eclipse.core.resources.natures" id="bic-provider" name="Bic Provider">
+ <runtime>
+ <run class="org.eclipse.team.tests.core.RepositoryProviderBic"/>
+ </runtime>
+ <one-of-nature id="org.eclipse.team.repository-provider"/>
+</extension>
+
+<extension point="org.eclipse.core.resources.natures" id="naish-provider" name="Naish Provider">
+ <runtime>
+ <run class="org.eclipse.team.tests.core.RepositoryProviderNaish"/>
+ </runtime>
+ <one-of-nature id="org.eclipse.team.repository-provider"/>
+</extension>
+
+<extension point="org.eclipse.core.resources.natures" id="other" name="Bad Set Provider">
+ <runtime>
+ <run class="org.eclipse.team.tests.core.RepositoryProviderOtherSport"/>
+ </runtime>
+ <one-of-nature id="some set"/>
+</extension>
+
+</plugin>
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..ffdd249f3
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
@@ -0,0 +1,37 @@
+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.runtime.CoreException;
+import org.eclipse.core.tests.harness.EclipseWorkspaceTest;
+import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.team.core.TeamException;
+
+public class RepositoryProviderTests extends EclipseWorkspaceTest {
+ 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(2, repoProviderIds.size());
+ assertEquals(true, repoProviderIds.contains(RepositoryProviderBic.NATURE_ID));
+ assertEquals(true, repoProviderIds.contains(RepositoryProviderNaish.NATURE_ID));
+ assertEquals(false, repoProviderIds.contains(RepositoryProviderOtherSport.NATURE_ID));
+ }
+}
diff --git a/tests/org.eclipse.team.tests.core/test.xml b/tests/org.eclipse.team.tests.core/test.xml
new file mode 100644
index 000000000..e81ca551e
--- /dev/null
+++ b/tests/org.eclipse.team.tests.core/test.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<project name="Team Automated Tests" default="run" basedir=".">
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+
+ <!-- sets the properties eclipse-home, and library-file -->
+ <property name="eclipse-home" value="${basedir}/../../"/>
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+
+ <!-- get the repository.properties which identify the cvs test repository -->
+ <property name="team-home" value="${eclipse-home}/plugins/org.eclipse.team.tests.core"/>
+ <property file="${team-home}/repository.properties"/>
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp/>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="location" value="${eclipse-home}/cvs_sniff_folder"/>
+ <delete dir="${location}" quiet="true"/>
+
+ <!-- Session Test ** CVS Provider ** -->
+ <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties"/>
+ <property name="data-dir" value="${location}"/>
+ <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
+ <property name="classname" value="org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider"/>
+ </ant>
+
+ <!-- Session Test ** CVS Resources ** -->
+ <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties"/>
+ <property name="data-dir" value="${location}"/>
+ <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
+ <property name="classname" value="org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResource"/>
+ </ant>
+
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after the tests -->
+ <!-- have been run. You can use this to delete temporary files that are created. -->
+ <target name="cleanup">
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen after all -->
+ <!-- the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="cvs-tests-summary.xml"/>
+ </ant>
+ </target>
+
+</project>

Back to the top