Rename method

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

View File

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

View File

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