1 package org.codehaus.plexus.compiler;
2
3 import java.io.File;
4 import java.util.Set;
5
6 import org.junit.jupiter.api.Test;
7
8 import static org.junit.jupiter.api.Assertions.assertFalse;
9 import static org.junit.jupiter.api.Assertions.assertTrue;
10
11 class AbstractCompilerTest {
12
13 @Test
14 void getSourceFilesForSourceRootShouldReturnEmptyForNotExistingLocation() {
15
16 CompilerConfiguration config = new CompilerConfiguration();
17 File fileLocation = new File("non/existing/location").getAbsoluteFile();
18
19 assertFalse(fileLocation.exists());
20
21 Set<String> sourcesFile = AbstractCompiler.getSourceFilesForSourceRoot(config, fileLocation.getAbsolutePath());
22
23 assertTrue(sourcesFile.isEmpty());
24 }
25 }