use of com.jcabi.github.UserOrganizations in project jcabi-github by jcabi.
the class MkUserTest method testGetOrganizations.
/**
* Tests that MkUser.organizations() returns a value.
*
* @throws IOException when there is an error creating the MkUser begin tested
*/
@Test
public void testGetOrganizations() throws IOException {
final MkUser user = new MkUser(new MkStorage.InFile(), "orgTestIterate");
final UserOrganizations orgs = user.organizations();
MatcherAssert.assertThat(orgs, Matchers.notNullValue());
}
use of com.jcabi.github.UserOrganizations in project jcabi-github by jcabi.
the class MkUserOrganizationsTest method iteratesUserOrganizations.
/**
* MkUserOrganizations can list user organizations.
* @throws Exception If some problem inside
*/
@Test
public void iteratesUserOrganizations() throws Exception {
final String login = "orgTestIterate";
final Github github = new MkGithub(login);
final UserOrganizations userOrgs = github.users().get(login).organizations();
github.organizations().get(login);
MatcherAssert.assertThat(userOrgs.iterate(), Matchers.<Organization>iterableWithSize(1));
}
Aggregations