From 0fc42daf5cb1a4ebf4ddddda229b06e602c0308a Mon Sep 17 00:00:00 2001 From: Marcin Krykowski Date: Sat, 13 Jun 2020 23:53:44 +0100 Subject: [PATCH] Rename method --- .../src/main/java/com/baeldung/formatNumber/FormatNumber.java | 2 +- .../java/com/baeldung/formatNumber/FormatNumberUnitTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java-numbers-3/src/main/java/com/baeldung/formatNumber/FormatNumber.java b/java-numbers-3/src/main/java/com/baeldung/formatNumber/FormatNumber.java index b7c54eb6be..6b9806fe22 100644 --- a/java-numbers-3/src/main/java/com/baeldung/formatNumber/FormatNumber.java +++ b/java-numbers-3/src/main/java/com/baeldung/formatNumber/FormatNumber.java @@ -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); } diff --git a/java-numbers-3/src/test/java/com/baeldung/formatNumber/FormatNumberUnitTest.java b/java-numbers-3/src/test/java/com/baeldung/formatNumber/FormatNumberUnitTest.java index 514ca45cdb..a0fe21b8d5 100644 --- a/java-numbers-3/src/test/java/com/baeldung/formatNumber/FormatNumberUnitTest.java +++ b/java-numbers-3/src/test/java/com/baeldung/formatNumber/FormatNumberUnitTest.java @@ -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