Corrected problems caused by merge

This commit is contained in:
Matti Uusitalo 2018-12-17 13:55:15 +02:00
parent 8183c18406
commit 89e3cac0e2
1 changed files with 3 additions and 11 deletions

View File

@ -347,19 +347,11 @@ public class QuestionnaireResponseValidatorDstu3Test {
}
@Test
public void testRequiredQuestionWithEnableWhenHidesQuestionHasAnswerTrue() {
public void testEnableWhenWithHasAnswerTrueDisablesQuestionWhenNoAnswerIsPresent() {
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.STRING);
// create the questionnaire
QuestionnaireItemComponent item1 = new QuestionnaireItemComponent();
item1.setLinkId("link1").setRequired(true);
q.addItem(item1);
QuestionnaireItemEnableWhenComponent enable = new QuestionnaireItemEnableWhenComponent();
item1.addEnableWhen(enable);
enable.setQuestion("link0");
enable.setHasAnswer(true);
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.STRING);
q.addItem().setLinkId("link1").setRequired(true).addEnableWhen().setQuestion("link0").setHasAnswer(true);
QuestionnaireResponse qa = new QuestionnaireResponse();