Skip to content

Commit f1517f1

Browse files
committed
Add test case in EthereumTypeMapperTest
1 parent 6dac68c commit f1517f1

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/test/java/blockchains/iaas/uni/stuttgart/de/plugin/ethereum/EthereumTypeMapperTest.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@
1313

1414
import org.junit.jupiter.api.Assertions;
1515
import org.junit.jupiter.api.Test;
16-
import org.web3j.abi.datatypes.Address;
17-
import org.web3j.abi.datatypes.DynamicBytes;
18-
import org.web3j.abi.datatypes.Type;
19-
import org.web3j.abi.datatypes.Utf8String;
20-
import org.web3j.abi.datatypes.generated.Bytes8;
21-
import org.web3j.abi.datatypes.generated.Int160;
22-
import org.web3j.abi.datatypes.generated.Uint160;
16+
import org.web3j.abi.datatypes.*;
17+
import org.web3j.abi.datatypes.generated.*;
2318

2419
class EthereumTypeMapperTest {
2520
@Test
@@ -72,6 +67,14 @@ void testTypes(){
7267
"}";
7368
result = EthereumTypeMapper.getEthereumType(bytes);
7469
Assertions.assertEquals(DynamicBytes.class, result);
70+
71+
final String uint256Type = "{\n" +
72+
"\t\"type\": \"integer\",\n" +
73+
" \t\"minimum\": 0,\n" +
74+
" \t\"maximum\": 115792089237316195423570985008687907853269984665640564039457584007913129639935\n" +
75+
"}";
76+
result = EthereumTypeMapper.getEthereumType(uint256Type);
77+
Assertions.assertEquals(Uint256.class, result);
7578
}
7679

7780
}

0 commit comments

Comments
 (0)