test/fixed the failed tests

This commit is contained in:
hongwei 2022-09-28 17:59:32 +02:00
parent 07d2a2c37e
commit 328a26cb51
5 changed files with 30 additions and 13 deletions

View File

@ -1654,7 +1654,9 @@ object AkkaConnector_vDec2018 extends Connector with AkkaConnectorActorInit {
reasonRequested=com.openbankproject.commons.model.PinResetReason.FORGOT)),
collected=Some(CardCollectionInfo(toDate(collectedExample))),
posted=Some(CardPostedInfo(toDate(postedExample))),
customerId=customerIdExample.value)
customerId=customerIdExample.value,
cvv = cvvExample.value,
brand = brandExample.value)
),
exampleInboundMessage = (
InBoundCreatePhysicalCard(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
@ -1710,7 +1712,7 @@ object AkkaConnector_vDec2018 extends Connector with AkkaConnectorActorInit {
posted: Option[CardPostedInfo], customerId: String, cvv: String, brand: String,
callContext: Option[CallContext]): OBPReturnType[Box[PhysicalCard]] = {
import com.openbankproject.commons.dto.{InBoundCreatePhysicalCard => InBound, OutBoundCreatePhysicalCard => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber, serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId)
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber, serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId, cvv, brand)
val response: Future[Box[InBound]] = (southSideActor ? req).mapTo[InBound].recoverWith(recoverFunction).map(Box !! _)
response.map(convertToTuple[PhysicalCard](callContext))
}

View File

@ -1792,7 +1792,9 @@ trait RestConnector_vMar2019 extends Connector with KafkaHelper with MdcLoggable
reasonRequested=com.openbankproject.commons.model.PinResetReason.FORGOT)),
collected=Some(CardCollectionInfo(toDate(collectedExample))),
posted=Some(CardPostedInfo(toDate(postedExample))),
customerId=customerIdExample.value)),
customerId=customerIdExample.value,
cvv = cvvExample.value,
brand = brandExample.value)),
exampleInboundMessage = (
InBoundCreatePhysicalCard(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
status=MessageDocsSwaggerDefinitions.inboundStatus,
@ -1835,15 +1837,18 @@ trait RestConnector_vMar2019 extends Connector with KafkaHelper with MdcLoggable
reasonRequested=com.openbankproject.commons.model.PinResetReason.FORGOT)),
collected=Some(CardCollectionInfo(toDate(collectedExample))),
posted=Some(CardPostedInfo(toDate(postedExample))),
customerId=customerIdExample.value))
),
customerId=customerIdExample.value,
cvv = Some(cvvExample.value),
brand = Some(brandExample.value)))),
adapterImplementation = Some(AdapterImplementation("- Core", 1))
)
override def createPhysicalCard(bankCardNumber: String, nameOnCard: String, cardType: String, issueNumber: String, serialNumber: String, validFrom: Date, expires: Date, enabled: Boolean, cancelled: Boolean, onHotList: Boolean, technology: String, networks: List[String], allows: List[String], accountId: String, bankId: String, replacement: Option[CardReplacementInfo], pinResets: List[PinResetInfo], collected: Option[CardCollectionInfo], posted: Option[CardPostedInfo], customerId: String, cvv: String,
override def createPhysicalCard(bankCardNumber: String, nameOnCard: String, cardType: String, issueNumber: String, serialNumber: String, validFrom: Date, expires: Date, enabled: Boolean,
cancelled: Boolean, onHotList: Boolean, technology: String, networks: List[String], allows: List[String], accountId: String, bankId: String, replacement: Option[CardReplacementInfo],
pinResets: List[PinResetInfo], collected: Option[CardCollectionInfo], posted: Option[CardPostedInfo], customerId: String, cvv: String,
brand: String,callContext: Option[CallContext]): OBPReturnType[Box[PhysicalCard]] = {
import com.openbankproject.commons.dto.{InBoundCreatePhysicalCard => InBound, OutBoundCreatePhysicalCard => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber, serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId)
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber, serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId,cvv, brand)
val response: Future[Box[InBound]] = sendRequest[InBound](getUrl(callContext, "createPhysicalCard"), HttpMethods.POST, req, callContext)
response.map(convertToTuple[PhysicalCard](callContext))
}

View File

@ -1773,7 +1773,9 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
reasonRequested=com.openbankproject.commons.model.PinResetReason.FORGOT)),
collected=Some(CardCollectionInfo(toDate(collectedExample))),
posted=Some(CardPostedInfo(toDate(postedExample))),
customerId=customerIdExample.value)
customerId=customerIdExample.value,
cvv = cvvExample.value,
brand = brandExample.value)
),
exampleInboundMessage = (
InBoundCreatePhysicalCard(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
@ -1823,10 +1825,14 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
adapterImplementation = Some(AdapterImplementation("- Core", 1))
)
override def createPhysicalCard(bankCardNumber: String, nameOnCard: String, cardType: String, issueNumber: String, serialNumber: String, validFrom: Date, expires: Date, enabled: Boolean, cancelled: Boolean, onHotList: Boolean, technology: String, networks: List[String], allows: List[String], accountId: String, bankId: String, replacement: Option[CardReplacementInfo], pinResets: List[PinResetInfo], collected: Option[CardCollectionInfo], posted: Option[CardPostedInfo], customerId: String, cvv: String,
brand: String,callContext: Option[CallContext]): OBPReturnType[Box[PhysicalCard]] = {
override def createPhysicalCard(bankCardNumber: String, nameOnCard: String, cardType: String, issueNumber: String, serialNumber: String,
validFrom: Date, expires: Date, enabled: Boolean, cancelled: Boolean, onHotList: Boolean, technology: String, networks: List[String],
allows: List[String], accountId: String, bankId: String, replacement: Option[CardReplacementInfo], pinResets: List[PinResetInfo],
collected: Option[CardCollectionInfo], posted: Option[CardPostedInfo], customerId: String, cvv: String,
brand: String, callContext: Option[CallContext]): OBPReturnType[Box[PhysicalCard]] = {
import com.openbankproject.commons.dto.{InBoundCreatePhysicalCard => InBound, OutBoundCreatePhysicalCard => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber, serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId)
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankCardNumber, nameOnCard, cardType, issueNumber,
serialNumber, validFrom, expires, enabled, cancelled, onHotList, technology, networks, allows, accountId, bankId, replacement, pinResets, collected, posted, customerId, cvv, brand)
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_create_physical_card", req, callContext)
response.map(convertToTuple[PhysicalCard](callContext))
}

View File

@ -735,7 +735,9 @@ case class OutBoundCreatePhysicalCard(outboundAdapterCallContext: OutboundAdapte
pinResets: List[PinResetInfo],
collected: Option[CardCollectionInfo],
posted: Option[CardPostedInfo],
customerId: String
customerId: String,
cvv: String,
brand: String
) extends TopicTrait
case class InBoundCreatePhysicalCard(inboundAdapterCallContext: InboundAdapterCallContext, status: Status, data: PhysicalCard) extends InBoundTrait[PhysicalCard]
@ -948,7 +950,9 @@ case class OutBoundCreatePhysicalCardLegacy (outboundAdapterCallContext: Outboun
pinResets: List[PinResetInfo],
collected: Option[CardCollectionInfo],
posted: Option[CardPostedInfo],
customerId: String) extends TopicTrait
customerId: String,
cvv: String = "",
brand: String = "") extends TopicTrait
case class InBoundCreatePhysicalCardLegacy (inboundAdapterCallContext: InboundAdapterCallContext, status: Status, data: PhysicalCard) extends InBoundTrait[PhysicalCard]