File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
src/test/java/org/gitlab4j/api Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .gitlab4j .api ;
2+
3+ import org .gitlab4j .api .models .*;
4+ import org .gitlab4j .api .models .Package ;
5+ import org .junit .Before ;
6+ import org .junit .BeforeClass ;
7+ import org .junit .Test ;
8+ import org .junit .experimental .categories .Category ;
9+
10+ import java .util .*;
11+ import static org .junit .Assert .*;
12+ import static org .junit .Assume .assumeNotNull ;
13+
14+ @ Category (IntegrationTest .class )
15+ public class TestPackageApi extends AbstractIntegrationTest {
16+
17+ private static GitLabApi gitLabApi ;
18+ private static Project testProject ;
19+
20+ public TestPackageApi () {
21+ super ();
22+ }
23+
24+ @ BeforeClass
25+ public static void setup () {
26+ gitLabApi = baseTestSetup ();
27+ testProject = getTestProject ();
28+ }
29+
30+ @ Before
31+ public void beforeMethod () {
32+ assumeNotNull (gitLabApi );
33+ }
34+
35+ @ Test
36+ public void getPackagesStream () throws GitLabApiException {
37+ PackagesApi packagesApi = gitLabApi .getPackagesApi ();
38+
39+ assumeNotNull (packagesApi );
40+
41+ Optional <Package > packageOptional = packagesApi .getPackagesStream (testProject .getId ()).findAny ();
42+
43+ assertTrue (packageOptional .isPresent ());
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments