assertTrue(model.isLastPageAndComplete());
}
@Test
public void toggleOnAnswerChanged() throws Exception {
Survey model = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\script\\skippagefiles\\toggleonanswerchanged.xml")));
assertTrue(model.isNextPageAvailable());
assertFalse(model.isPreviousPageAvailable());
assertFalse(model.isLastPageAndComplete());
model.setAnswer("toggle", "checked");
assertFalse(model.isNextPageAvailable());
assertFalse(model.isPreviousPageAvailable());
assertTrue(model.isLastPageAndComplete());
model.setAnswer("toggle", "unchecked");
assertTrue(model.isNextPageAvailable());
assertFalse(model.isPreviousPageAvailable());
assertFalse(model.isLastPageAndComplete());
}