Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2014-01-13 17:39:28 +0000
committerSteffen Pingel2014-01-13 18:20:31 +0000
commit9cf9041d9f8f453ace9d724dc17d3730eaf72ad8 (patch)
tree64b3c803b5c9fa70a02393f13ed426043d246afd /org.eclipse.mylyn.tasks.core.tests
parentae40f6d214cf4cee26d1bad19afb8a6bd059242b (diff)
downloadorg.eclipse.mylyn.tasks-9cf9041d9f8f453ace9d724dc17d3730eaf72ad8.tar.gz
org.eclipse.mylyn.tasks-9cf9041d9f8f453ace9d724dc17d3730eaf72ad8.tar.xz
org.eclipse.mylyn.tasks-9cf9041d9f8f453ace9d724dc17d3730eaf72ad8.zip
425458: [api] provide API in connector core to validate repositories
Change-Id: Ibe8909f301ff3da2cdac9c9383bd9132e4988c81 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425458
Diffstat (limited to 'org.eclipse.mylyn.tasks.core.tests')
-rw-r--r--org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryInfoTest.java37
-rw-r--r--org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryVersionTest.java36
2 files changed, 73 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryInfoTest.java b/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryInfoTest.java
new file mode 100644
index 000000000..3a3a90052
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryInfoTest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Tasktop Technologies 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.tasks.core;
+
+import static org.junit.Assert.assertSame;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class RepositoryInfoTest {
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void constructWitNullVersion() throws Exception {
+ thrown.expect(NullPointerException.class);
+ new RepositoryInfo(null);
+ }
+
+ @Test
+ public void getVersion() {
+ RepositoryVersion version = new RepositoryVersion("1");
+ assertSame(version, new RepositoryInfo(version).getVersion());
+ }
+
+}
diff --git a/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryVersionTest.java b/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryVersionTest.java
new file mode 100644
index 000000000..c4046cecf
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core.tests/src/org/eclipse/mylyn/tasks/core/RepositoryVersionTest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Tasktop Technologies 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.tasks.core;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class RepositoryVersionTest {
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void constructWithNullVersion() throws Exception {
+ thrown.expect(NullPointerException.class);
+ new RepositoryVersion(null);
+ }
+
+ @Test
+ public void getVersion() {
+ assertEquals("1", new RepositoryVersion("1").toString());
+ }
+
+}

Back to the top