1
2
3
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
14
15
16 @OAuthScope(OAuthScope.Scope.USER)
17 final class RtUserITCase {
18
19 @Test
20 void checksWhoAmI() throws IOException {
21 final GitHub github = GitHubIT.connect();
22 final User self = github.users().self();
23 MatcherAssert.assertThat(
24 "Values are not equal",
25 self.login(),
26 Matchers.not(Matchers.is(Matchers.emptyString()))
27 );
28 }
29
30 @Test
31 void readKeys() {
32 MatcherAssert.assertThat(
33 "Values are not equal",
34 GitHubIT.connect().users().self().keys().toString(),
35 Matchers.equalTo("https://api.github.com/user/keys")
36 );
37 }
38
39 }