@@ -19,10 +19,10 @@ void serializeUcqVariable_withFilter() throws JAXBException, UnsupportedEncoding
1919 // Given
2020 QuestionType question = new QuestionType ();
2121 question .setQuestionType (QuestionTypeEnum .SINGLE_CHOICE );
22- question .setOptionFilter ("nvl($AGE$, 0) > 18" );
2322
2423 ResponseType response = new ResponseType ();
2524 response .setVariableReference ("id-loop-variable" );
25+ response .setOptionFilter ("nvl($AGE$, 0) > 18" );
2626 response .setChoiceType (ChoiceTypeEnum .VARIABLE );
2727
2828 question .getResponse ().add (response );
@@ -40,10 +40,10 @@ void serializeUcqVariable_withFilter() throws JAXBException, UnsupportedEncoding
4040 {
4141 "type": "QuestionType",
4242 "questionType": "SINGLE_CHOICE",
43- "OptionFilter": "nvl($AGE$, 0) > 18",
4443 "Response": [
4544 {
4645 "VariableReference": "id-loop-variable",
46+ "OptionFilter": "nvl($AGE$, 0) > 18",
4747 "choiceType": "VARIABLE"
4848 }
4949 ]
@@ -100,7 +100,7 @@ void deserializeUcqVariable() throws JAXBException {
100100 QuestionType question = (QuestionType ) questionnaire .getChild ().getFirst ();
101101 assertEquals (QuestionTypeEnum .SINGLE_CHOICE , question .getQuestionType ());
102102 assertEquals (ChoiceTypeEnum .VARIABLE , question .getResponse ().getFirst ().getChoiceType ());
103- assertNull (question .getOptionFilter ());
103+ assertNull (question .getResponse (). getFirst (). getOptionFilter ());
104104 assertNotNull (question .getResponse ());
105105 assertFalse (question .getResponse ().isEmpty ()) ;
106106 assertEquals ("id-loop-variable" , question .getResponse ().getFirst ().getVariableReference ());
@@ -114,10 +114,10 @@ void deserializeUcqVariable_withFilter() throws JAXBException {
114114 {
115115 "type": "QuestionType",
116116 "questionType": "SINGLE_CHOICE",
117- "OptionFilter": "nvl($AGE$, 0) > 18",
118117 "Response": {
119118 "choiceType": "VARIABLE",
120- "VariableReference": "id-loop-variable"
119+ "VariableReference": "id-loop-variable",
120+ "OptionFilter": "nvl($AGE$, 0) > 18",
121121 }
122122 }
123123 ]
@@ -130,7 +130,7 @@ void deserializeUcqVariable_withFilter() throws JAXBException {
130130 QuestionType question = (QuestionType ) questionnaire .getChild ().getFirst ();
131131 assertEquals (QuestionTypeEnum .SINGLE_CHOICE , question .getQuestionType ());
132132 assertEquals (ChoiceTypeEnum .VARIABLE , question .getResponse ().getFirst ().getChoiceType ());
133- assertEquals ("nvl($AGE$, 0) > 18" , question .getOptionFilter ());
133+ assertEquals ("nvl($AGE$, 0) > 18" , question .getResponse (). getFirst (). getOptionFilter ());
134134 assertNotNull (question .getResponse ());
135135 assertFalse (question .getResponse ().isEmpty ()) ;
136136 assertEquals ("id-loop-variable" , question .getResponse ().getFirst ().getVariableReference ());
0 commit comments