Corrected test as per review comments

This commit is contained in:
Amitabh.Tiwari
2021-06-23 10:22:35 +05:30
parent 268f9d73bf
commit 5b1f24f5a8

View File

@@ -30,13 +30,13 @@ public class StringToBigIntegerUnitTest {
@Test(expected = NumberFormatException.class)
public void whenGetStringWithRadix_thenThrowError() {
final String inputString = "Hello Baeldung";
final String inputString = "290f98";
new BigInteger(inputString, 7);
}
@Test
public void whenGetStringUsingByte_thenOk() {
final String inputString = "Hello Baeldung";
final String inputString = "290f98";
byte[] inputStringBytes = inputString.getBytes();
BigInteger result = new BigInteger(inputStringBytes);
assertEquals("Hello Baeldung", new String(result.toByteArray()));