DTR-3713: CIS MRF Business Functions F18d,18f,18g#68
DTR-3713: CIS MRF Business Functions F18d,18f,18g#68yanshengzhangHMRC wants to merge 6 commits intomainfrom
Conversation
|
app/uk/gov/hmrc/constructionindustryscheme/connectors/ChrisConnector.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/constructionindustryscheme/connectors/ChrisConnector.scala
Outdated
Show resolved
Hide resolved
|
| def createMonthlyNilReturnRequestJson(payload: BuiltSubmissionPayload): JsValue = | ||
| XmlToJsonConvertor.convertXmlToJson(payload.envelope.toString) match { | ||
| case XmlConversionResult(true, Some(json), _) => json | ||
| case XmlConversionResult(false, _, Some(error)) => Json.obj("error" -> error) |
There was a problem hiding this comment.
unit test for case XmlConversionResult(false, _, Some(error))
There was a problem hiding this comment.
Hi @jassalrichy , I think it's already covered in unit test below, but kindly let me know if concern persists
"return error JSON when XML conversion fails"
| XmlToJsonConvertor.convertXmlToJson(payload.envelope.toString) match { | ||
| case XmlConversionResult(true, Some(json), _) => json | ||
| case XmlConversionResult(false, _, Some(error)) => Json.obj("error" -> error) | ||
| case _ => Json.obj("error" -> "unexpected conversion failure") |
There was a problem hiding this comment.
Hi @jassalrichy , I think it's already covered in unit test below, but kindly let me know if concern persists
"return unexpected conversion failure when neither json nor error provided"
| res: SubmissionResult | ||
| )(implicit hc: HeaderCarrier): Future[Result] = | ||
| validateCorrelationId(correlationId, res.meta.correlationId) match { | ||
| case Left(reason) => |
There was a problem hiding this comment.
unit test for case Left(reason)
There was a problem hiding this comment.
added now
| ) | ||
| } | ||
| } | ||
| .recover { case ex => |
There was a problem hiding this comment.
added now
| val sent = sentRaw.trim | ||
| val ack = ackRaw.trim | ||
|
|
||
| if (sent.isEmpty || ack.isEmpty) Left("empty correlationId") |
There was a problem hiding this comment.
unit test for if (sent.isEmpty || ack.isEmpty)
unit test for if (sent != ack)
There was a problem hiding this comment.
added now
There was a problem hiding this comment.
We point to stubs by default in application.conf
These ports are overridden by using appplication.no.stubs.conf
There was a problem hiding this comment.
forget to deselect them in the last commit, updated now
|
No description provided.