-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return empty list for not existing source root location
- Loading branch information
1 parent
b5631da
commit 36ead1f
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
plexus-compiler-api/src/test/java/org/codehaus/plexus/compiler/AbstractCompilerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.codehaus.plexus.compiler; | ||
|
||
import java.io.File; | ||
import java.util.Set; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
class AbstractCompilerTest { | ||
|
||
@Test | ||
void getSourceFilesForSourceRootShouldReturnEmptyForNotExistingLocation() { | ||
|
||
CompilerConfiguration config = new CompilerConfiguration(); | ||
File fileLocation = new File("non/existing/location").getAbsoluteFile(); | ||
|
||
assertFalse(fileLocation.exists()); | ||
|
||
Set<String> sourcesFile = AbstractCompiler.getSourceFilesForSourceRoot(config, fileLocation.getAbsolutePath()); | ||
|
||
assertTrue(sourcesFile.isEmpty()); | ||
} | ||
} |