rename variable and move underscore to front to simulate minus (#7010)

This commit is contained in:
Abhishek Malik 2019-05-24 08:48:32 +05:30 committed by KevinGilmore
parent c15baecbde
commit ef9f687f68
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ public class NumberFormatExceptionUnitTest {
@Test(expected = NumberFormatException.class)
public void givenParseIntMethod_whenUnderscoreInInput_thenFail() {
int bIntPrim = Integer.parseInt("6_000");
int bIntPrim = Integer.parseInt("_6000");
}
@Test(expected = NumberFormatException.class)
@ -51,7 +51,7 @@ public class NumberFormatExceptionUnitTest {
@Test(expected = NumberFormatException.class)
public void givenDecodeMethod_whenAlphabetInInput_thenFail() {
Long decodeInteger = Long.decode("64403L");
Long decodedLong = Long.decode("64403L");
}
/* ---INTEGER PASS CASES--- */
@ -72,7 +72,7 @@ public class NumberFormatExceptionUnitTest {
int aIntPrim = Integer.parseInt("6000 ".trim());
assertEquals(6000, aIntPrim);
int bIntPrim = Integer.parseInt("6_000".replaceAll("_", ""));
int bIntPrim = Integer.parseInt("_6000".replaceAll("_", ""));
assertEquals(6000, bIntPrim);
int cIntPrim = Integer.parseInt("-6000");