regional independent test
This commit is contained in:
parent
cbf830353c
commit
e053d3601d
|
@ -10,26 +10,26 @@ public class DecimalFormatterTest {
|
|||
|
||||
@Test
|
||||
public void to0DecimalTest() {
|
||||
Assert.assertEquals("1", DecimalFormatter.to0Decimal(1.33d));
|
||||
Assert.assertEquals("1U", DecimalFormatter.to0Decimal(1.33d, "U"));
|
||||
Assert.assertEquals("1", DecimalFormatter.to0Decimal(1.33d).replace(",", "."));
|
||||
Assert.assertEquals("1U", DecimalFormatter.to0Decimal(1.33d, "U").replace(",", "."));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void to1DecimalTest() {
|
||||
Assert.assertEquals("1.3", DecimalFormatter.to1Decimal(1.33d));
|
||||
Assert.assertEquals("1.3U", DecimalFormatter.to1Decimal(1.33d, "U"));
|
||||
Assert.assertEquals("1.3", DecimalFormatter.to1Decimal(1.33d).replace(",", "."));
|
||||
Assert.assertEquals("1.3U", DecimalFormatter.to1Decimal(1.33d, "U").replace(",", "."));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void to2DecimalTest() {
|
||||
Assert.assertEquals("1.33", DecimalFormatter.to2Decimal(1.3333d));
|
||||
Assert.assertEquals("1.33U", DecimalFormatter.to2Decimal(1.3333d, "U"));
|
||||
Assert.assertEquals("1.33", DecimalFormatter.to2Decimal(1.3333d).replace(",", "."));
|
||||
Assert.assertEquals("1.33U", DecimalFormatter.to2Decimal(1.3333d, "U").replace(",", "."));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void to3DecimalTest() {
|
||||
Assert.assertEquals("1.333", DecimalFormatter.to3Decimal(1.3333d));
|
||||
Assert.assertEquals("1.333U", DecimalFormatter.to3Decimal(1.3333d, "U"));
|
||||
Assert.assertEquals("1.333", DecimalFormatter.to3Decimal(1.3333d).replace(",", "."));
|
||||
Assert.assertEquals("1.333U", DecimalFormatter.to3Decimal(1.3333d, "U").replace(",", "."));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue