Add test case for hexadecimal to decimal (#3685)

This commit is contained in:
Nandini Anagondi 2022-10-27 16:47:38 +05:30 committed by GitHub
parent 0bed437eb2
commit 838916d8e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,14 @@
package com.thealgorithms.conversions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class HexaDecimalToDecimalTest {
@Test
public void testhexaDecimalToDecimal(){
assertEquals(161, HexaDecimalToDecimal.getHexaToDec("A1"));
assertEquals(428, HexaDecimalToDecimal.getHexaToDec("1ac"));
}
}