Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JUAN CASTAÑEDA committed Aug 31, 2023
1 parent d373286 commit ad3b8a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ jobs:
cache: 'gradle'

- name: Run tests
run: ./gradlew check
run: ./gradlew build && ./gradlew check

release_and_publish:
name: Release and Publish
runs-on: ubuntu-latest

needs:
- test
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions lib/src/test/java/com/jimdo/jcountry/JCountryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ void testJCountryReadTranslations() {
@Test
void testJCountryReadsTranslations() {
// More than 50% of work population is covered with these languages.
ArrayList<String> languages = new ArrayList<>(Arrays.asList("zh_CN", "zh_HK", "zh_TW", "es", "de", "bn", "bn_IN", "pt", "pt_BR", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko"));
ArrayList<String> languages = new ArrayList<>(Arrays.asList("nl", "es", "de", "bn", "bn_IN", "pt", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko"));
CountryDB countryDB = new CountryDBImpl(true);

languages.forEach( it -> {
Optional<ResourceBundle> bundle = countryDB.getCountriesTranslations(new Locale(it));
System.out.println(it);
assertTrue(!bundle.isEmpty());
});
}
Expand Down Expand Up @@ -109,11 +110,12 @@ void testJCountryLanguagesDBReadTranslations() {
@Test
void testJCountryLanguagesReadsTranslations() {
// More than 50% of work population is covered with these languages.
ArrayList<String> languages = new ArrayList<>(Arrays.asList("zh_CN", "zh_HK", "zh_TW", "es", "de", "bn", "pt", "pt_BR", "ru", "ja", "hi", "ar", "pa", "fr", "tr", "ko"));
ArrayList<String> languages = new ArrayList<>(Arrays.asList("es", "de", "it", "ja", "hi", "ar", "pa", "fr", "tr", "nl"));
LanguageDB languageDB = new LanguageDBImpl(true);

languages.forEach( it -> {
Optional<ResourceBundle> bundle = languageDB.getLanguagesTranslations(new Locale(it));
System.out.println(it);
assertTrue(!bundle.isEmpty(), it + " translation");
});
}
Expand Down

0 comments on commit ad3b8a8

Please sign in to comment.