From e36ea6b60a5c13f8490dec2f22911cdd23e422cb Mon Sep 17 00:00:00 2001 From: "siva.isikella" <7499500+sivaprakashiv@users.noreply.github.com> Date: Thu, 8 Jul 2021 13:14:35 +0100 Subject: [PATCH] APID-192 - review comments applied --- .../connectors/OutboundConnector.scala | 2 +- .../controllers/OutboundControllerSpec.scala | 2 +- .../services/OutboundServiceSpec.scala | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/uk/gov/hmrc/apiplatformoutboundsoap/connectors/OutboundConnector.scala b/app/uk/gov/hmrc/apiplatformoutboundsoap/connectors/OutboundConnector.scala index 02aa5f0..fc1cff3 100644 --- a/app/uk/gov/hmrc/apiplatformoutboundsoap/connectors/OutboundConnector.scala +++ b/app/uk/gov/hmrc/apiplatformoutboundsoap/connectors/OutboundConnector.scala @@ -18,7 +18,7 @@ package uk.gov.hmrc.apiplatformoutboundsoap.connectors import org.apache.http.HttpStatus import play.api.http.HeaderNames.CONTENT_TYPE -import play.api.{Configuration, Logger, LoggerLike} +import play.api.{Logger, LoggerLike} import uk.gov.hmrc.apiplatformoutboundsoap.config.AppConfig import uk.gov.hmrc.apiplatformoutboundsoap.models.SoapRequest import uk.gov.hmrc.http.HttpReads.Implicits._ diff --git a/test/uk/gov/hmrc/apiplatformoutboundsoap/controllers/OutboundControllerSpec.scala b/test/uk/gov/hmrc/apiplatformoutboundsoap/controllers/OutboundControllerSpec.scala index 241e2f5..b772efc 100644 --- a/test/uk/gov/hmrc/apiplatformoutboundsoap/controllers/OutboundControllerSpec.scala +++ b/test/uk/gov/hmrc/apiplatformoutboundsoap/controllers/OutboundControllerSpec.scala @@ -24,7 +24,7 @@ import org.mockito.{ArgumentCaptor, ArgumentMatchersSugar, MockitoSugar} import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import org.scalatestplus.play.guice.GuiceOneAppPerSuite -import play.api.{Application, Configuration} +import play.api.Application import play.api.http.Status.{BAD_REQUEST, OK} import play.api.inject.guice.GuiceApplicationBuilder import play.api.libs.json.{JsBoolean, Json} diff --git a/test/uk/gov/hmrc/apiplatformoutboundsoap/services/OutboundServiceSpec.scala b/test/uk/gov/hmrc/apiplatformoutboundsoap/services/OutboundServiceSpec.scala index 1249d3e..c7a9279 100644 --- a/test/uk/gov/hmrc/apiplatformoutboundsoap/services/OutboundServiceSpec.scala +++ b/test/uk/gov/hmrc/apiplatformoutboundsoap/services/OutboundServiceSpec.scala @@ -223,7 +223,7 @@ class OutboundServiceSpec extends AnyWordSpec with Matchers with GuiceOneAppPerS messageCaptor.getValue.messageId shouldBe messageId messageCaptor.getValue.globalId shouldBe expectedGlobalId messageCaptor.getValue.createDateTime shouldBe expectedCreateDateTime - messageCaptor.getValue.asInstanceOf[SentOutboundSoapMessage].ccnHttpStatus shouldBe httpCode + messageCaptor.getValue.ccnHttpStatus shouldBe httpCode messageCaptor.getValue.notificationUrl shouldBe messageRequestFullAddressing.notificationUrl messageCaptor.getValue.destinationUrl shouldBe "http://example.com:1234/CCN2.Service.Customs.EU.ICS.RiskAnalysisOrchestrationBAS" } @@ -243,7 +243,7 @@ class OutboundServiceSpec extends AnyWordSpec with Matchers with GuiceOneAppPerS messageCaptor.getValue.messageId shouldBe messageId messageCaptor.getValue.globalId shouldBe expectedGlobalId messageCaptor.getValue.createDateTime shouldBe expectedCreateDateTime - messageCaptor.getValue.asInstanceOf[FailedOutboundSoapMessage].ccnHttpStatus shouldBe httpCode + messageCaptor.getValue.ccnHttpStatus shouldBe httpCode messageCaptor.getValue.notificationUrl shouldBe messageRequestFullAddressing.notificationUrl messageCaptor.getValue.destinationUrl shouldBe "http://example.com:1234/CCN2.Service.Customs.EU.ICS.RiskAnalysisOrchestrationBAS" }