mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-29 14:06:30 +01:00
Added test for SimpleMessageProvider.format(String, Object...).
This commit is contained in:
parent
e6c36be019
commit
ba6f580fd8
@ -32,6 +32,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
|||||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||||
import com.onarandombox.MultiverseCore.localization.LazyLocaleMessageProvider;
|
import com.onarandombox.MultiverseCore.localization.LazyLocaleMessageProvider;
|
||||||
import com.onarandombox.MultiverseCore.localization.MultiverseMessage;
|
import com.onarandombox.MultiverseCore.localization.MultiverseMessage;
|
||||||
|
import com.onarandombox.MultiverseCore.localization.SimpleMessageProvider;
|
||||||
import com.onarandombox.MultiverseCore.test.utils.TestInstanceCreator;
|
import com.onarandombox.MultiverseCore.test.utils.TestInstanceCreator;
|
||||||
|
|
||||||
@RunWith(PowerMockRunner.class)
|
@RunWith(PowerMockRunner.class)
|
||||||
@ -190,4 +191,11 @@ public class TestLocalization {
|
|||||||
// Clean up afterwards:
|
// Clean up afterwards:
|
||||||
assertTrue(file.delete());
|
assertTrue(file.delete());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFormat() {
|
||||||
|
String testString = "%sthisisasimpletest&moretesting&&thatsit.";
|
||||||
|
String result = SimpleMessageProvider.format(testString, "arg");
|
||||||
|
assertEquals("argthisisasimpletest\u00A7moretesting&thatsit.", result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user