MCPcopy Index your code
hub / github.com/chain/Core / generateClient

Method generateClient

sdk/java/src/test/java/com/chain/TestUtils.java:9–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 */
8public class TestUtils {
9 public static Client generateClient() throws Exception {
10 String coreURL = System.getProperty("chain.api.url");
11 String accessToken = System.getProperty("client.access.token");
12 String certPath = System.getProperty("client.trusted.cert");
13 if (coreURL == null || coreURL.isEmpty()) {
14 coreURL = "http://localhost:1999";
15 }
16
17 Client.Builder builder = new Client.Builder().setURL(coreURL).setAccessToken(accessToken);
18
19 if (certPath != null) {
20 builder.setTrustedCerts(certPath);
21 }
22
23 return builder.build();
24 }
25}

Callers 15

testKeyQueryMethod · 0.95
testAccountQueryMethod · 0.95
testAssetQueryMethod · 0.95
testAssetPaginationMethod · 0.95
testTransactionQueryMethod · 0.95
testBalanceQueryMethod · 0.95
testPaginationMethod · 0.95
testKeyCreateMethod · 0.95
testAccountCreateMethod · 0.95
testAssetCreateMethod · 0.95

Calls 4

setAccessTokenMethod · 0.80
setURLMethod · 0.80
setTrustedCertsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected