Skip to content

Add Schema validation to transformJsonToXml developer tool #1158

Add Schema validation to transformJsonToXml developer tool

Add Schema validation to transformJsonToXml developer tool #1158

Triggered via pull request May 22, 2025 10:25
Status Success
Total duration 2m 11s
Artifacts

mutationtesting.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
A change can be made to line 83 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L83
removed call to java/io/BufferedWriter::newLine (no tests cover this line VoidMethodCallMutator)
A change can be made to line 70 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L70
removed call to writeValidationExceptionsToFile (no tests cover this line VoidMethodCallMutator)
A change can be made to line 82 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L82
removed call to java/io/BufferedWriter::write (no tests cover this line VoidMethodCallMutator)
A change can be made to line 81 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L81
removed last varargs argument in call to format (no tests cover this line VarargsMutator)
2 different changes can be made to line 68 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L68
removed conditional - replaced equality check with true (no tests cover this line RemoveConditionalMutator_EQUAL_IF) removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE)
2 different changes can be made to line 92 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L92
removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (no tests cover this line RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 60 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L60
removed call to writeValidationExceptionsToFile (no tests cover this line VoidMethodCallMutator)
A change can be made to line 103 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L103
replaced return value with null for getXmlValidator (no tests cover this line NullReturnValsMutator)
A change can be made to line 101 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L101
removed call to javax/xml/validation/Validator::setErrorHandler (no tests cover this line VoidMethodCallMutator)
A change can be made to line 57 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator.java#L57
removed call to javax/xml/validation/Validator::validate (no tests cover this line VoidMethodCallMutator)
2 different changes can be made to a lambda on line 71 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/TransformJsonToXml.java#L71
swapped parameters 1 and 2 in call to validateOutputToXmlSchema in 1st lambda in run (no tests cover this line ParamSwapMutator) removed call to uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XmlSchemaValidator::validateOutputToXmlSchema in 1st lambda in run (no tests cover this line VoidMethodCallMutator)
2 different changes can be made to line 18 without causing a test to fail: service/src/main/java/uk/nhs/adaptors/gp2gp/transformJsonToXmlTool/XsdErrorHandler.java#L18
replaced boolean return with false for isValid (no tests cover this line BooleanFalseReturnValsMutator) replaced boolean return with true for isValid (no tests cover this line BooleanTrueReturnValsMutator)