1
2
3
4
5 package com.jcabi.github.mock;
6
7 import jakarta.json.Json;
8 import jakarta.json.JsonObject;
9 import java.io.IOException;
10 import org.hamcrest.MatcherAssert;
11 import org.hamcrest.Matchers;
12 import org.junit.jupiter.api.Test;
13
14
15
16
17
18
19 final class MkTagsTest {
20
21 @Test
22 void createsMkTag() throws IOException {
23 final JsonObject tagger = Json.createObjectBuilder()
24 .add("name", "Scott").add("email", "Scott@gmail.com").build();
25 MatcherAssert.assertThat(
26 "Value is null",
27 new MkGitHub().randomRepo().git().tags().create(
28 Json.createObjectBuilder().add("name", "v.0.1")
29 .add("message", "test tag").add("sha", "abcsha12")
30 .add("tagger", tagger).build()
31 ),
32 Matchers.notNullValue()
33 );
34 }
35 }