1
2
3
4
5 package com.jcabi.github.mock;
6
7 import com.jcabi.github.Stars;
8 import java.io.IOException;
9 import org.hamcrest.MatcherAssert;
10 import org.hamcrest.Matchers;
11 import org.junit.jupiter.api.Test;
12
13
14
15
16
17 final class MkStarsTest {
18
19 @Test
20 void starsRepository() throws IOException {
21 final Stars stars = new MkGitHub().randomRepo().stars();
22 stars.star();
23 MatcherAssert.assertThat(
24 "Values are not equal",
25 stars.starred(),
26 Matchers.is(true)
27 );
28 }
29
30 @Test
31 void unstarsRepository() throws IOException {
32 final Stars stars = new MkGitHub().randomRepo().stars();
33 stars.star();
34 stars.unstar();
35 MatcherAssert.assertThat(
36 "Values are not equal",
37 stars.starred(),
38 Matchers.is(false)
39 );
40 }
41 }