Corrected problems caused by merge
This commit is contained in:
parent
8183c18406
commit
89e3cac0e2
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue