-
Notifications
You must be signed in to change notification settings - Fork 6
/
TokenApplicationIT.java
31 lines (25 loc) · 880 Bytes
/
TokenApplicationIT.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.web3labs.quorum.token;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.http.HttpService;
/**
* Simple integration test to demonstrate Token contract.
*/
public class TokenApplicationIT {
private static final Logger log = LoggerFactory.getLogger(TokenApplicationIT.class);
@Test
public void testNodeConnections() throws Exception {
testConnection("<node-url>");
// duplicate for multiple nodes ...
}
private void testConnection(String nodeUrl) throws Exception {
Web3j web3j = Web3j.build(new HttpService(nodeUrl));
log.info(web3j.web3ClientVersion().send().getWeb3ClientVersion());
}
@Test
public void testLifeCycle() throws Exception {
TokenApplication.main(new String[]{ });
}
}