Rename method

This commit is contained in:
Marcin Krykowski 2020-06-13 23:53:44 +01:00
parent e3f7cf6b2c
commit 0fc42daf5c
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ public class FormatNumber {
return new Double(df.format(value)); return new Double(df.format(value));
} }
public static String withLongNumbers(double value) { public static String withLargeIntegers(double value) {
DecimalFormat df = new DecimalFormat("###,###,###"); DecimalFormat df = new DecimalFormat("###,###,###");
return df.format(value); return df.format(value);
} }

View File

@ -59,9 +59,9 @@ public class FormatNumberUnitTest {
} }
@Test @Test
public void givenIntegerNumber_whenFormatNumber_withLongNumbers_thenGetExpectedResult() { public void givenIntegerNumber_whenFormatNumber_withLargeIntegers_thenGetExpectedResult() {
int value = 123456789; int value = 123456789;
assertThat(withLongNumbers(value)).isEqualTo("123,456,789"); assertThat(withLargeIntegers(value)).isEqualTo("123,456,789");
} }
@Test @Test