mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Generate Nearby list using Wikidata Query
Plus, * remove duplicate location service manager * add option to switch data sources of Nearby * faster sorting of places * minor coding style improvents
This commit is contained in:
parent
eb99350caf
commit
8731987385
11 changed files with 302 additions and 82 deletions
|
|
@ -1,8 +1,8 @@
|
|||
package fr.free.nrw.commons;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
||||
public class UtilsTest {
|
||||
|
|
@ -11,7 +11,7 @@ public class UtilsTest {
|
|||
assertThat(Utils.fixExtension("SampleFile.jpeg", "jpeg"), is("SampleFile.jpg"));
|
||||
}
|
||||
|
||||
@Test public void fixExtensionJPEGToJpg() {
|
||||
@Test public void fixExtensionJpegToJpg() {
|
||||
assertThat(Utils.fixExtension("SampleFile.JPEG", null), is("SampleFile.jpg"));
|
||||
}
|
||||
|
||||
|
|
@ -46,4 +46,12 @@ public class UtilsTest {
|
|||
@Test public void fixExtensionJpegNotExtension() {
|
||||
assertThat(Utils.fixExtension("SAMPLE.jpeg.SAMPLE", "jpg"), is("SAMPLE.jpeg.SAMPLE.jpg"));
|
||||
}
|
||||
|
||||
@Test public void stripLocalizedStringPass() {
|
||||
assertThat(Utils.stripLocalizedString("Hello"), is("Hello"));
|
||||
}
|
||||
|
||||
@Test public void stripLocalizedStringJa() {
|
||||
assertThat(Utils.stripLocalizedString("\"こんにちは\"@ja"), is("こんにちは"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue