-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4549f9
commit d03e06e
Showing
10 changed files
with
53 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
38 changes: 38 additions & 0 deletions
38
...tep-up-transformer/src/test/java/eu/itesla_project/iidm/ddb/eurostag/EurostagDDBTest.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,38 @@ | ||
package eu.itesla_project.iidm.ddb.eurostag; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import java.io.IOException; | ||
import java.net.URISyntaxException; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.junit.Test; | ||
|
||
public class EurostagDDBTest { | ||
|
||
@Test | ||
public void testEurostagDDB() throws IOException, URISyntaxException { | ||
Path path1 = Paths.get("testsymboliclink/path1"); | ||
List<Path> ddbDirs = new ArrayList<Path>(); | ||
ddbDirs.add(path1); | ||
EurostagDDB eurostagDDB = new EurostagDDB(ddbDirs); | ||
assertEquals(eurostagDDB.findGenerator("").getFileName().toString(), ".tg"); | ||
assertEquals(eurostagDDB.findGenerator("p3file").getFileName().toString(), "p3file.tg"); | ||
assertEquals(eurostagDDB.findGenerator("file4").getFileName().toString(), "file4.tg"); | ||
assertEquals(eurostagDDB.findGenerator("file1").getFileName().toString(), "file1.tg"); | ||
assertEquals(eurostagDDB.findGenerator("filereal").getFileName().toString(), "filereal.tg"); | ||
} | ||
|
||
@Test | ||
public void testFindGenerator() throws IOException { | ||
Path path = Paths.get("testsymboliclink/lnpath2"); | ||
List<Path> ddbDirs = new ArrayList<Path>(); | ||
ddbDirs.add(path); | ||
EurostagDDB eurostagDDB = new EurostagDDB(ddbDirs); | ||
assertEquals(eurostagDDB.findGenerator("filereal").getFileName().toString(), "filereal.tg"); | ||
} | ||
|
||
} |
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 @@ | ||
testsymboliclink/path2 |
Empty file.
Empty file.
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 @@ | ||
testsymboliclink/path2/filereal.tg |
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 @@ | ||
testsymboliclink/path3/ |
Empty file.
Empty file.
Empty file.