1
2
3
4
5 package com.jcabi.xml;
6
7 import java.io.File;
8 import java.nio.file.Files;
9 import org.cactoos.io.TeeInput;
10 import org.cactoos.scalar.LengthOf;
11 import org.hamcrest.MatcherAssert;
12 import org.hamcrest.Matchers;
13 import org.junit.jupiter.api.Test;
14
15
16
17
18
19 final class FileSourcesTest {
20
21 @Test
22 void sourcesResolvedFromDir() throws Exception {
23 final File file = Files.createTempDirectory("")
24 .resolve("dummy.xml").toFile();
25 new LengthOf(new TeeInput("test", file)).value();
26 MatcherAssert.assertThat(
27 "File source was not present, but it should",
28 new FileSources().resolve(file.getAbsolutePath(), null),
29 Matchers.notNullValue()
30 );
31 }
32 }