getLanguageInfo returns Locale instead of String

so that java can automatically translate with Locale.getDisplayLanguage(), instead of always having English name of the language
This commit is contained in:
B0pol
2020-01-25 13:16:42 +01:00
parent 341372c0d0
commit e392b6c68f
7 changed files with 33 additions and 16 deletions

View File

@@ -11,6 +11,7 @@ import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -154,4 +155,9 @@ public class PeertubeStreamExtractorDefaultTest {
supportInfoExtractor.fetchPage();
assertEquals("https://utip.io/chatsceptique", supportInfoExtractor.getSupportInfo());
}
@Test
public void testGetLanguageInformation() throws ParsingException {
assertEquals(new Locale("en"), extractor.getLanguageInfo());
}
}