View Javadoc
1   /*
2    * SPDX-FileCopyrightText: Copyright (c) 2013-2025 Yegor Bugayenko
3    * SPDX-License-Identifier: MIT
4    */
5   package com.jcabi.github;
6   
7   import java.io.IOException;
8   import org.hamcrest.MatcherAssert;
9   import org.hamcrest.Matchers;
10  import org.junit.jupiter.api.Test;
11  
12  /**
13   * Test case for {@link RtUserOrganizations}.
14   * @see <a href="https://developer.github.com/v3/orgs/">Organizations API</a>
15   * @since 0.24
16   */
17  @OAuthScope(OAuthScope.Scope.READ_ORG)
18  final class RtUserOrganizationsITCase {
19      @Test
20      void iterateOrganizations() throws IOException {
21          final UserOrganizations orgs = GitHubIT.connect()
22              .users().get("yegor256")
23              .organizations();
24          MatcherAssert.assertThat(
25              "Value is null",
26              orgs.iterate().iterator().next(),
27              Matchers.notNullValue()
28          );
29      }
30  
31  }