-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
3 changed files
with
72 additions
and
66 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
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 |
---|---|---|
@@ -1,60 +1,60 @@ | ||
/* (C)2024 */ | ||
package fr.insee.trevas.jupyter; | ||
|
||
import fr.insee.vtl.model.Dataset; | ||
import org.junit.jupiter.api.Test; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import fr.insee.vtl.model.Dataset; | ||
import java.util.Map; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SDMXTest { | ||
|
||
@Test | ||
public void testLoadSDMXSource() { | ||
Dataset ds = VtlKernel.loadSDMXSource( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", | ||
"BPE_DETAIL_VTL"); | ||
Dataset ds = | ||
VtlKernel.loadSDMXSource( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", "BPE_DETAIL_VTL"); | ||
assertThat(ds.getDataStructure().size()).isEqualTo(6); | ||
} | ||
|
||
@Test | ||
public void testLoadSDMXSourceWithData() throws Exception { | ||
new VtlKernel(); | ||
Dataset ds = VtlKernel.loadSDMXSource( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", | ||
"BPE_DETAIL_VTL", | ||
"src/test/resources/sdmx/BPE_DETAIL_SAMPLE.csv"); | ||
Dataset ds = | ||
VtlKernel.loadSDMXSource( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", | ||
"BPE_DETAIL_VTL", | ||
"src/test/resources/sdmx/BPE_DETAIL_SAMPLE.csv"); | ||
assertThat(ds.getDataStructure().size()).isEqualTo(6); | ||
} | ||
|
||
@Test | ||
public void testRunSDMXPreview() throws Exception { | ||
new VtlKernel(); | ||
VtlKernel.runSDMXPreview( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
VtlKernel.runSDMXPreview("src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
} | ||
|
||
@Test | ||
public void testRunSDMX() throws Exception { | ||
new VtlKernel(); | ||
VtlKernel.runSDMX( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", | ||
Map.of("BPE_DETAIL_VTL", "src/test/resources/sdmx/BPE_DETAIL_SAMPLE.csv", | ||
"LEGAL_POP", "src/test/resources/sdmx/LEGAL_POP_NUTS3.csv" | ||
)); | ||
Map.of( | ||
"BPE_DETAIL_VTL", | ||
"src/test/resources/sdmx/BPE_DETAIL_SAMPLE.csv", | ||
"LEGAL_POP", | ||
"src/test/resources/sdmx/LEGAL_POP_NUTS3.csv")); | ||
} | ||
|
||
@Test | ||
public void testGetTransformationsVTL() throws Exception { | ||
new VtlKernel(); | ||
VtlKernel.getTransformationsVTL( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
VtlKernel.getTransformationsVTL("src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
} | ||
|
||
@Test | ||
public void testGetRulesetsVTL() throws Exception { | ||
new VtlKernel(); | ||
VtlKernel.getRulesetsVTL( | ||
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
VtlKernel.getRulesetsVTL("src/test/resources/sdmx/DSD_BPE_CENSUS.xml"); | ||
} | ||
} |