assertEquals("", model.getPages().get(0).getQuestions().get(9).getAnswer());
}
@Test
public void loadXMLAnswersBefore() throws Exception {
Survey model = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\script\\populatetemplatefiles\\loadxmlanswersbefore.xml")));
model.loadXMLAnswers("src\\test\\org\\jsurveylib\\model\\script\\populatetemplatefiles\\loadxmlanswersbeforeresult.xml");
//every time you answer a question, the populateTemplate adds a new one AFTER what already exists
assertEquals(10, model.getPages().get(0).getQuestions().size());
assertEquals("first", model.getPages().get(0).getQuestions().get(9).getAnswer());
assertEquals("first", model.getPages().get(0).getQuestions().get(8).getAnswer());
assertEquals("second", model.getPages().get(0).getQuestions().get(7).getAnswer());
assertEquals("second", model.getPages().get(0).getQuestions().get(6).getAnswer());
assertEquals("third", model.getPages().get(0).getQuestions().get(5).getAnswer());
assertEquals("third", model.getPages().get(0).getQuestions().get(4).getAnswer());
assertEquals("fourth", model.getPages().get(0).getQuestions().get(3).getAnswer());
assertEquals("fourth", model.getPages().get(0).getQuestions().get(2).getAnswer());
assertEquals("", model.getPages().get(0).getQuestions().get(1).getAnswer());
assertEquals("", model.getPages().get(0).getQuestions().get(0).getAnswer());
}