Revize 7134e3bc
Přidáno uživatelem Jakub Danek před více než 5 roky(ů)
server/src/main/java/cz/zcu/yamanager/util/localization/Message.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
public final class Message { |
10 | 10 |
|
11 |
private static Map<Language, ResourceBundle> BUNDLES;
|
|
11 |
static Map<Language, ResourceBundle> BUNDLES; |
|
12 | 12 |
|
13 | 13 |
static { |
14 | 14 |
BUNDLES = new HashMap<>(); |
server/src/test/java/cz/zcu/yamanager/util/localization/MessageTest.java | ||
---|---|---|
1 | 1 |
package cz.zcu.yamanager.util.localization; |
2 | 2 |
|
3 |
import org.junit.jupiter.api.AfterEach; |
|
3 | 4 |
import org.junit.jupiter.api.Test; |
4 | 5 |
|
5 |
import static org.junit.jupiter.api.Assertions.*;
|
|
6 |
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
6 | 7 |
|
7 | 8 |
class MessageTest { |
8 | 9 |
|
10 |
@AfterEach |
|
11 |
void tearDown() { |
|
12 |
Message.BUNDLES.clear(); |
|
13 |
} |
|
14 |
|
|
9 | 15 |
@Test |
10 | 16 |
void getString_inCzech_true() { |
11 | 17 |
Message.config().addLanguage(Language.CZ); |
Také k dispozici: Unified diff
re #36 hotfix to make tests pass, still needs refactoring