View Javadoc
1   /*
2    * SPDX-FileCopyrightText: Copyright (c) 2013-2025 Yegor Bugayenko
3    * SPDX-License-Identifier: MIT
4    */
5   package com.jcabi.github.mock;
6   
7   import jakarta.json.Json;
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   * Test case for {@link MkMarkdown}.
15   * @since 0.1
16   */
17  final class MkMarkdownTest {
18  
19      @Test
20      void canBeRendered() throws IOException {
21          final String text = "Hello, **world**!";
22          MatcherAssert.assertThat(
23              "Values are not equal",
24              new MkGitHub().markdown().render(
25                  Json.createObjectBuilder()
26                      .add("text", text)
27                      .build()
28              ),
29              Matchers.equalTo(text)
30          );
31      }
32  }