3 import static org.junit.Assert.assertTrue;
5 import java.util.Locale;
7 import org.junit.After;
10 import com.ranfa.main.Messages;
12 public class LanguageTest {
15 private Locale defaultLocale = Locale.getDefault();
16 private Locale jp = Locale.JAPAN;
17 private Locale us = Locale.US;
20 public void jpTest() {
22 Locale.setDefault(this.jp);
25 assertTrue(Messages.MSGCalcStart.toString().equals("開始!"));
26 assertTrue(Messages.MSGDatabaseNotExist.toString().equals("楽曲データベースが見つかりませんでした。自動的に作成されます…\n注意:初回起動ではなく、かつ、Jarファイルと同じ階層に\"database.json\"というファイルが存在するにも関わらず\nこのポップアップが出た場合、開発者までご一報ください。\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues"));
27 assertTrue(Messages.MSGAlbumTypeBeingCalculated.toString().equals("計算中..."));
28 assertTrue(Messages.MSGNarrowingDownSongs.toString().equals("<html><body>楽曲<br>絞り込み</body></html>"));
32 public void enTest() {
34 Locale.setDefault(this.us);
37 assertTrue(Messages.MSGCalcStart.toString().equals("Start!"));
38 assertTrue(Messages.MSGDatabaseNotExist.toString().equals("Music database does not exist.\nIt will be automatically created.\nATTENTION:There is the JSON file named \"database.json\" in the same directory which executable is contained and you see this pop up,\nPlease contact the Developer.\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues"));
39 assertTrue(Messages.MSGAlbumTypeBeingCalculated.toString().equals("Simulating..."));
40 assertTrue(Messages.MSGNarrowingDownSongs.toString().equals("<html><body>Narrow down<br>songs</body></html>"));
44 public void revertDefault() {
45 Locale.setDefault(this.defaultLocale);