Skip to content

Commit

Permalink
Fix getFromxml when raw is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
bcivel committed Sep 12, 2024
1 parent 584ea7a commit b2163cc
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,20 @@ else if (xmlToParse == null) {
// Else we can try to parse it thanks to the dedicated service

try {
String valueFromXml = xmlUnitService.getFromXml(xmlToParse, testCaseExecutionData.getValue1());

String valueFromXml = "";
switch (testCaseExecutionData.getValue3()) {
case TestCaseCountryProperties.VALUE3_VALUE:
valueFromXml = xmlUnitService.getFromXml(xmlToParse, testCaseExecutionData.getValue1());
break;
case TestCaseCountryProperties.VALUE3_RAW:
valueFromXml = xmlUnitService.getRawFromXml(xmlToParse, testCaseExecutionData.getValue1());
break;
default:
valueFromXml = xmlUnitService.getFromXml(xmlToParse, testCaseExecutionData.getValue1());
break;
}

if (valueFromXml != null) {
testCaseExecutionData.setValue(valueFromXml);
MessageEvent res = new MessageEvent(MessageEventEnum.PROPERTY_SUCCESS_GETFROMXML);
Expand Down

0 comments on commit b2163cc

Please sign in to comment.