1
2
3
4
5 package com.jcabi.xml;
6
7 import org.hamcrest.MatcherAssert;
8 import org.hamcrest.Matchers;
9 import org.junit.jupiter.api.Test;
10 import org.w3c.dom.ls.LSInput;
11
12
13
14
15
16 final class ClasspathInputTest {
17 @Test
18 void readsStringFromResourceSuccessfully() {
19 final LSInput input = new ClasspathInput(
20 "Id", "com/jcabi/xml/simple.xml"
21 );
22 MatcherAssert.assertThat(
23 "Input XML does not contains expected string, but it should",
24 input.getStringData(),
25 Matchers.containsString("<root>")
26 );
27 }
28 }