use of org.junit.jupiter.api.condition.DisabledOnJre in project robozonky by RoboZonky.
the class InterestNumberFormatFactoryTest method formattingCzech.
@DisabledOnJre(JRE.JAVA_8)
@Test
void formattingCzech() throws TemplateValueFormatException, TemplateModelException {
final BigDecimal n = new BigDecimal("0.0001");
final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment());
final TemplateNumberModel m = () -> n;
final String result = f.formatToPlainText(m);
assertThat(result.trim()).isEqualTo("0,01" + (char) 160 + "%");
}
use of org.junit.jupiter.api.condition.DisabledOnJre in project robozonky by RoboZonky.
the class InterestNumberFormatFactoryTest method formattingCzech2.
@DisabledOnJre(JRE.JAVA_8)
@Test
void formattingCzech2() throws TemplateValueFormatException, TemplateModelException {
final BigDecimal n = new BigDecimal("0.0000");
final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment());
final TemplateNumberModel m = () -> n;
final String result = f.formatToPlainText(m);
assertThat(result.trim()).isEqualTo("0" + (char) 160 + "%");
}
use of org.junit.jupiter.api.condition.DisabledOnJre in project robozonky by RoboZonky.
the class InterestNumberFormatFactoryTest method formattingCzech3.
@DisabledOnJre(JRE.JAVA_8)
@Test
void formattingCzech3() throws TemplateValueFormatException, TemplateModelException {
final BigDecimal n = new BigDecimal("0.001");
final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment());
final TemplateNumberModel m = () -> n;
final String result = f.formatToPlainText(m);
assertThat(result.trim()).isEqualTo("0,1" + (char) 160 + "%");
}
Aggregations