()
| 7 | */ |
| 8 | public 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 | } |
no test coverage detected