package fr.insee.eno.main;

import java.io.File;

import fr.insee.eno.postprocessing.lunaticxml.*;
import org.junit.Test;

import fr.insee.eno.generation.DDI2LunaticXMLGenerator;
import fr.insee.eno.postprocessing.Postprocessor;
import fr.insee.eno.service.GenerationService;
import fr.insee.eno.preprocessing.DDICleaningPreprocessor;
import fr.insee.eno.preprocessing.DDIDereferencingPreprocessor;
import fr.insee.eno.preprocessing.DDITitlingPreprocessor;
import fr.insee.eno.preprocessing.Preprocessor;

public class DummyTestDDI2LunaticXML {
	
	private DDI2LunaticXMLGenerator ddi2lunaticXmlGenerator = new DDI2LunaticXMLGenerator();	
	
	@Test
	public void mainTest() {
		
		String basePathDDI2JS = "src/test/resources/ddi-to-lunatic-xml";
		
		Preprocessor[] preprocessors = {
				new DDIDereferencingPreprocessor(),
				new DDICleaningPreprocessor(),
				new DDITitlingPreprocessor()};
		
		Postprocessor[] postprocessors =  {
				new LunaticXMLSortComponentsPostprocessor(),
				new LunaticXMLInsertGenericQuestionsPostprocessor(),
				new LunaticXMLPaginationPostprocessor(),
				new LunaticXMLExternalizeVariablesAndDependenciesPostprocessor(),
				new LunaticXMLVTLParserPostprocessor()};
		
		GenerationService genServiceDDI2JS = new GenerationService(preprocessors, ddi2lunaticXmlGenerator,postprocessors);
		File in = new File(String.format("%s/in.xml", basePathDDI2JS));
		
		try {
			File output = genServiceDDI2JS.generateQuestionnaire(in,"test");
			System.out.println(output.getAbsolutePath());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

		
	}

}

@@ -1035,53 +1035,8 @@
 (),%0A
-%09%09%09%09new LunaticXMLPaginationPostprocessor(),%0A
 %09%09%09%09
@@ -1135,32 +1135,78 @@
 rPostprocessor()
+,%0A%09%09%09%09new LunaticXMLPaginationPostprocessor(),
 %7D;%0A%09%09%0A%09%09Generati

Update DummyTestDDI2LunaticXML.java