Skip to content

Commit

Permalink
test: rename test folder to 'functional'
Browse files Browse the repository at this point in the history
  • Loading branch information
nsenave committed Sep 27, 2023
1 parent 3d74360 commit de43ed2
Show file tree
Hide file tree
Showing 31 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions eno-core/src/test/java/fr/insee/eno/core/DDIToEnoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DDIToEnoTest {
void transformQuestionnaire_nonNullOutput(String questionnaireId) throws DDIParsingException {
//
EnoQuestionnaire enoQuestionnaire = DDIToEno.transform(
this.getClass().getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-"+questionnaireId+".xml"),
this.getClass().getClassLoader().getResourceAsStream("functional/ddi/ddi-" +questionnaireId+".xml"),
EnoParameters.of(EnoParameters.Context.DEFAULT, ModeParameter.PROCESS));
//
assertNotNull(enoQuestionnaire);
Expand All @@ -58,7 +58,7 @@ static void mapDDI() throws DDIParsingException {
enoParameters.setResponseTimeQuestion(false);
//
enoQuestionnaire = DDIToEno.transform(
DDIToEnoTest.class.getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml"),
DDIToEnoTest.class.getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml"),
enoParameters);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DDIToLunaticTest {
void transformQuestionnaire_nonNullOutput(String questionnaireId) throws DDIParsingException {
//
Questionnaire lunaticQuestionnaire = DDIToLunatic.transform(
this.getClass().getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-"+questionnaireId+".xml"),
this.getClass().getClassLoader().getResourceAsStream("functional/ddi/ddi-" +questionnaireId+".xml"),
EnoParameters.of(Context.DEFAULT, ModeParameter.CAWI, Format.LUNATIC));
//
assertNotNull(lunaticQuestionnaire);
Expand All @@ -53,7 +53,7 @@ class FunctionalTest1 {
@BeforeAll
static void mapLunaticQuestionnaire() throws DDIParsingException {
lunaticQuestionnaire = DDIToLunatic.transform(
DDIToLunaticTest.class.getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml"),
DDIToLunaticTest.class.getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml"),
EnoParameters.of(Context.DEFAULT, ModeParameter.CAWI, Format.LUNATIC));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static void mapQuestionnaire() throws DDIParsingException {
enoQuestionnaire = new EnoQuestionnaire();
DDIMapper ddiMapper = new DDIMapper();
ddiMapper.mapDDI(DDIDeserializer.deserialize(
IntegrationTests.class.getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml")),
IntegrationTests.class.getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml")),
enoQuestionnaire);
// When
DDIResolveSequencesStructure ddiResolveSequencesStructure = new DDIResolveSequencesStructure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class TestWithLargeQuestionnaire {
void largeCoverageQuestionnaire() throws DDIParsingException {
// Given
EnoQuestionnaire enoQuestionnaire = DDIToEno.transform(
this.getClass().getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml"),
this.getClass().getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml"),
EnoParameters.of(Context.DEFAULT, ModeParameter.CAWI, Format.LUNATIC));
Questionnaire lunaticQuestionnaire = new Questionnaire();
LunaticMapper lunaticMapper = new LunaticMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class IntegrationTests {
void largeCoverageQuestionnaire() throws DDIParsingException {
// Given
EnoQuestionnaire enoQuestionnaire = DDIToEno.transform(
this.getClass().getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml"),
this.getClass().getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml"),
EnoParameters.of(Context.DEFAULT, ModeParameter.PROCESS, Format.LUNATIC));
Questionnaire lunaticQuestionnaire = new Questionnaire();
LunaticMapper lunaticMapper = new LunaticMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DDIIndexTest {
void indexSandboxDDI() throws DDIParsingException {
//
DDIInstanceDocument ddiInstanceDocument = DDIDeserializer.deserialize(
DDIIndexTest.class.getClassLoader().getResource("end-to-end/ddi/ddi-l8x6fhtd.xml"));
DDIIndexTest.class.getClassLoader().getResource("functional/ddi/ddi-l8x6fhtd.xml"));
//
DDIIndex ddiIndex = new DDIIndex();
ddiIndex.indexDDI(ddiInstanceDocument);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EnoIndexTest {
void indexingDoneByMapper() throws IOException, DDIParsingException {
//
DDIInstanceDocument ddiInstanceDocument = DDIDeserializer.deserialize(
this.getClass().getClassLoader().getResourceAsStream("end-to-end/ddi/ddi-l20g2ba7.xml"));
this.getClass().getClassLoader().getResourceAsStream("functional/ddi/ddi-l20g2ba7.xml"));
EnoQuestionnaire enoQuestionnaire = new EnoQuestionnaire();
//
DDIMapper ddiMapper = new DDIMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void tableQuestion() throws DDIParsingException {
//
DDIIndex ddiIndex = new DDIIndex();
ddiIndex.indexDDI(DDIDeserializer.deserialize(
this.getClass().getClassLoader().getResource("end-to-end/ddi/ddi-l20g2ba7.xml")));
this.getClass().getClassLoader().getResource("functional/ddi/ddi-l20g2ba7.xml")));
//
QuestionGridType tableQuestionGrid = (QuestionGridType) ddiIndex.get("l8u8d67h");
assertNotNull(tableQuestionGrid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void helloLunaticQuestionnaire() {
void lunaticDeserializer_doesNotWork() {
JsonDeserializer jsonDeserializer = new JsonDeserializer();
assertThrows(Exception.class, () -> jsonDeserializer.deserialize(this.getClass().getClassLoader()
.getResourceAsStream("end-to-end/lunatic/lunatic-l20g2ba7.json")));
.getResourceAsStream("functional/lunatic/lunatic-l20g2ba7.json")));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void deserialize_simpleQuestionnaire() throws PoguesDeserializationException, UR
void deserialize_largeQuestionnaire() throws URISyntaxException, PoguesDeserializationException {
//
URL testPoguesFileUrl = this.getClass().getClassLoader().getResource(
"end-to-end/pogues/pogues-l20g2ba7.json");
"functional/pogues/pogues-l20g2ba7.json");
assert testPoguesFileUrl != null;
//
Questionnaire poguesQuestionnaire = PoguesDeserializer.deserialize(testPoguesFileUrl);
Expand Down

0 comments on commit de43ed2

Please sign in to comment.