Skip to content

Commit

Permalink
test: add test to ensure that all supported languages have language f…
Browse files Browse the repository at this point in the history
…lag icons (#688)
  • Loading branch information
skaldarnar authored Nov 13, 2022
1 parent 96a4062 commit c17773a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/java/org/terasology/launcher/util/ResourceTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2022 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.launcher.util;

import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.testfx.framework.junit5.ApplicationExtension;

import java.util.Locale;
import java.util.stream.Stream;

import static org.junit.jupiter.api.Assertions.assertNotNull;

@ExtendWith(ApplicationExtension.class)
class ResourceTests {

private static Stream<Arguments> provideSupportedLocales() {
return I18N.getSupportedLocales().stream().map(Arguments::of);
}

@ParameterizedTest
@MethodSource("provideSupportedLocales")
void ensureAllSupportedLocalesHaveFlagIcons(Locale locale) {
assertNotNull(I18N.getFxImage("flag_" + locale.toLanguageTag()));
}
}

0 comments on commit c17773a

Please sign in to comment.