Modified one method

This commit is contained in:
patkorek 2020-04-10 12:49:52 +02:00
parent a59aa14400
commit 76cdbd811e
1 changed files with 9 additions and 2 deletions

View File

@ -62,10 +62,17 @@ class ConvertStringToInt {
def stringNum = "123"
int expectedInt = 123
int intNum = new Integer(stringNum).intValue()
int secondIntNum = new Integer(stringNum)
assertEquals(intNum, expectedInt)
assertEquals(secondIntNum, expectedInt)
}
@Test
void givenString_whenUsingNewInteger_thenConvertToInteger() {
def stringNum = "123"
int expectedInt = 123
int intNum = new Integer(stringNum)
assertEquals(intNum, expectedInt)
}
@Test