Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2020-04-12 11:01:21 +0000
committerMichael Keppler2020-04-12 11:03:26 +0000
commitf35bc2393d574d0c59f3c90b6f63d00612ce1920 (patch)
treeb3e0a68ef2ce35cf87ddb80abd4409039980c1b4 /org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github
parentc749931f769858d73b9c93ea4d819e8d665335f7 (diff)
downloadegit-github-f35bc2393d574d0c59f3c90b6f63d00612ce1920.tar.gz
egit-github-f35bc2393d574d0c59f3c90b6f63d00612ce1920.tar.xz
egit-github-f35bc2393d574d0c59f3c90b6f63d00612ce1920.zip
Update language list for search repository wizard page
Update the list of languages available for searching a repository by taking the current list of languages directly from the the github search page (as that is what the API understands for the language parameter). The manifest change was necessary to get rid of an "indirectly referenced" error. Change-Id: I3e989df4235e8032d7e50fcc22eb97862fba2718 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github')
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguagesTest.java (renamed from org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguageTest.java)18
2 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
index 76ba02d5..9d2a6923 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
@@ -77,7 +77,7 @@ import org.junit.runners.Suite.SuiteClasses;
LabelComparatorTest.class, //
LabelServiceTest.class, //
LabelTest.class, //
- LanguageTest.class, //
+ LanguagesTest.class, //
MarkdownServiceTest.class, //
MemberPayloadTest.class, //
MergeStatusTest.class, //
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguageTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguagesTest.java
index 3e74e16e..4a206b2d 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguageTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LanguagesTest.java
@@ -16,26 +16,26 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import org.eclipse.egit.github.core.Language;
+import org.eclipse.egit.github.core.Languages;
import org.junit.Test;
/**
- * Unit tests of {@link Language}
+ * Unit tests of {@link Languages}
*/
-public class LanguageTest {
+public class LanguagesTest {
/**
* Test languages
*/
@Test
public void languages() {
- assertNotNull(Language.values());
- assertTrue(Language.values().length > 0);
- for (Language lang : Language.values()) {
+ String[] languages = Languages.getLanguages();
+ assertNotNull(languages);
+ assertTrue(languages.length > 0);
+ for (String lang : languages) {
assertNotNull(lang);
- assertNotNull(Language.valueOf(lang.name()));
- assertNotNull(lang.getValue());
- assertFalse(lang.getValue().length() == 0);
+ assertFalse(lang.length() == 0);
+ assertFalse("HTML encoding found in language name", lang.contains("&"));
}
}

Back to the top