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 com.jcabi.xml.XMLDocument;
8   import org.hamcrest.MatcherAssert;
9   import org.hamcrest.Matchers;
10  import org.junit.jupiter.api.Test;
11  import org.xembly.Directives;
12  import org.xembly.Xembler;
13  
14  /**
15   * Unit tests for {@link MkNotification}.
16   * @since 0.40
17   * @checkstyle MagicNumberCheck (500 lines)
18   */
19  final class MkNotificationTest {
20      @Test
21      void returnsNumber() {
22          MatcherAssert.assertThat(
23              "Assertion failed",
24              new MkNotification(
25                  new XMLDocument(
26                      new Xembler(
27                          new Directives()
28                              .add("notification")
29                                  .add("id").set("123")
30                      ).xmlQuietly()
31                  )
32              ).number(),
33              Matchers.is(123L)
34          );
35      }
36  }