1
2
3
4
5 package com.jcabi.github;
6
7 import org.hamcrest.Matchers;
8 import org.junit.jupiter.api.Assumptions;
9
10
11
12
13
14
15 public final class GitHubIT {
16
17
18
19
20 private GitHubIT() {
21 }
22
23
24
25
26
27 @SuppressWarnings("PMD.ProhibitPublicStaticMethods")
28 public static GitHub connect() {
29 final String key = System.getProperty("failsafe.github.key");
30 Assumptions.assumeTrue(
31 !Matchers.emptyOrNullString().matches(key),
32 "GitHub key is required for integration tests"
33 );
34 return new RtGitHub(key);
35 }
36 }