-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extension and basename in report node + unit test
Signed-off-by: CARON Alice <[email protected]>
- Loading branch information
1 parent
f22791a
commit a942c20
Showing
8 changed files
with
31 additions
and
9 deletions.
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
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
20 changes: 20 additions & 0 deletions
20
cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/CgmesReportsTest.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,20 @@ | ||
package com.powsybl.cgmes.conversion.test; | ||
|
||
import com.powsybl.cgmes.conversion.CgmesReports; | ||
import com.powsybl.commons.datasource.ReadOnlyDataSource; | ||
import com.powsybl.commons.datasource.ResourceDataSource; | ||
import com.powsybl.commons.datasource.ResourceSet; | ||
import com.powsybl.commons.report.ReportNode; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
class CgmesReportsTest { | ||
|
||
@Test | ||
void importingCgmesFileReportTest() { | ||
ReportNode reportRoot = ReportNode.newRootReportNode().withMessageTemplate("test", "Test reports").build(); | ||
ReadOnlyDataSource ds = new ResourceDataSource("CGMES import file(s)", new ResourceSet("/", "GeneratingUnitTypes.xml", "groundTest.xml")); | ||
ReportNode reportNode = CgmesReports.importingCgmesFileReport(reportRoot, ds.getBaseName(), ds.getDataExtension()); | ||
assertEquals("Importing CGMES file(s) with basename 'CGMES import file(s)' and extension ''", reportNode.getMessage()); | ||
} | ||
} |
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
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
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
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
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