1
2
3
4
5 package com.jcabi.github.mock;
6
7 import com.jcabi.github.Issue;
8 import com.jcabi.github.Pull;
9 import com.jcabi.github.Repo;
10 import java.io.IOException;
11 import org.hamcrest.MatcherAssert;
12 import org.hamcrest.Matchers;
13 import org.junit.jupiter.api.Disabled;
14 import org.junit.jupiter.api.Test;
15
16
17
18
19
20
21 final class MkPullsTest {
22
23
24
25
26
27 @Test
28 void canCreateAPull() throws IOException {
29 final Repo repo = new MkGitHub().randomRepo();
30 final Pull pull = repo.pulls().create(
31 "hello",
32 "head-branch",
33 "base-branch"
34 );
35 final Issue.Smart issue = new Issue.Smart(
36 repo.issues().get(pull.number())
37 );
38 MatcherAssert.assertThat(
39 "Values are not equal",
40 issue.title(),
41 Matchers.is("hello")
42 );
43 }
44
45 @Test
46 @Disabled
47 void canFetchEmptyListOfPulls() {
48
49 }
50
51 @Test
52 @Disabled
53 void canFetchSinglePull() {
54
55 }
56 }