Added two extra tests to get getType function triggered for both coin types.

This commit is contained in:
Jorge Rego 2022-06-06 17:05:25 +02:00
parent 236f91a7e0
commit 0a05418a74

View file

@ -17,6 +17,18 @@ public class CryptoCoinInfoTest {
Assert.assertSame(coinInfo.getType().typeValue, CryptoCoinInfo.Type.ETHEREUM.typeValue);
}
@Test
public void testBitcoinTypeCoinInfo() {
CryptoCoinInfo coinInfo = new CryptoCoinInfo(CryptoCoinInfo.Type.BITCOIN, CryptoCoinInfo.Network.MAINNET);
Assert.assertSame(coinInfo.getType(), CryptoCoinInfo.Type.BITCOIN);
}
@Test
public void testEthereumTypeCoinInfo() {
CryptoCoinInfo coinInfo = new CryptoCoinInfo(CryptoCoinInfo.Type.ETHEREUM, CryptoCoinInfo.Network.MAINNET);
Assert.assertSame(coinInfo.getType(), CryptoCoinInfo.Type.ETHEREUM);
}
@Test
public void testNullTypeCoinInfo() {
CryptoCoinInfo coinInfo = new CryptoCoinInfo(null, CryptoCoinInfo.Network.MAINNET);