mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
Merge pull request #682 from constantine2nd/branches-atms-wip
Branches atms wip
This commit is contained in:
commit
43143a8fdd
@ -1100,7 +1100,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
|
||||
.mMoreInfo(branch.moreInfo.orNull)
|
||||
|
||||
.saveMe()
|
||||
} ?~! ErrorMessages.UpdateBranchError
|
||||
}
|
||||
case _ =>
|
||||
tryo {
|
||||
// Insert...
|
||||
@ -1173,7 +1173,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
|
||||
.mBranchType(branch.branchType.orNull)
|
||||
.mMoreInfo(branch.moreInfo.orNull)
|
||||
.saveMe()
|
||||
} ?~! ErrorMessages.CreateBranchError
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,9 @@ import net.liftweb.util.SimpleInjector
|
||||
|
||||
object Branches extends SimpleInjector {
|
||||
|
||||
case class BranchId(value : String)
|
||||
case class BranchId(value : String) {
|
||||
override def toString = value
|
||||
}
|
||||
|
||||
object BranchId {
|
||||
def unapply(id : String) = Some(BranchId(id))
|
||||
|
||||
@ -242,8 +242,8 @@ class BranchesTest extends V140ServerSetup with DefaultUsers {
|
||||
branch.address.postCode should equal(branchJson.address.postcode)
|
||||
branch.location.latitude should equal(branchJson.location.latitude)
|
||||
branch.location.longitude should equal(branchJson.location.longitude)
|
||||
branch.lobbyString.getOrElse("") should equal(branchJson.lobby.hours)
|
||||
branch.driveUpString.getOrElse("") should equal(branchJson.drive_up.hours)
|
||||
branch.lobbyString.get.hours should equal(branchJson.lobby.hours)
|
||||
branch.driveUpString.get.hours should equal(branchJson.drive_up.hours)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -23,7 +23,7 @@ class CreateBranchTest extends V210ServerSetup with DefaultUsers {
|
||||
|
||||
val customerPutJSON = BranchJsonPutV210(
|
||||
"gh.29.fi", "OBP",
|
||||
AddressJsonV140("VALTATIE 8", "", "", "AKAA", "", "", "37800"),
|
||||
AddressJsonV140("VALTATIE 8", "", "", "AKAA", "", "", "DE"),
|
||||
LocationJsonV140(1.2, 2.1),
|
||||
MetaJsonV140(LicenseJsonV140("", "")),
|
||||
LobbyStringJson(""),
|
||||
@ -90,7 +90,7 @@ class CreateBranchTest extends V210ServerSetup with DefaultUsers {
|
||||
feature("Assuring that endpoint 'Create Branch' works as expected - v2.1.0") {
|
||||
|
||||
val customerPostJSON = BranchJsonPostV210("123","gh.29.fi", "OBP",
|
||||
AddressJsonV140("VALTATIE 8", "", "", "AKAA", "", "", "37800"),
|
||||
AddressJsonV140("VALTATIE 8", "", "", "AKAA", "", "", "DE"),
|
||||
LocationJsonV140(1.2, 2.1),
|
||||
MetaJsonV140(LicenseJsonV140("", "")),
|
||||
LobbyStringJson(""),
|
||||
|
||||
@ -177,7 +177,7 @@ class SandboxDataLoadingTest extends FlatSpec with SendServerRequests with Shoul
|
||||
foundBranch.address.line2 should equal(branch.address.line_2)
|
||||
foundBranch.address.line3 should equal(branch.address.line_3)
|
||||
foundBranch.address.city should equal(branch.address.city)
|
||||
foundBranch.address.county should equal(branch.address.county)
|
||||
foundBranch.address.county should equal(Some(branch.address.county))
|
||||
foundBranch.address.state should equal(branch.address.state)
|
||||
|
||||
foundBranch.location.latitude should equal(branch.location.latitude)
|
||||
@ -189,8 +189,8 @@ class SandboxDataLoadingTest extends FlatSpec with SendServerRequests with Shoul
|
||||
foundBranch.meta.license.id should equal(branch.meta.license.id)
|
||||
foundBranch.meta.license.name should equal(branch.meta.license.name)
|
||||
|
||||
foundBranch.lobbyString.getOrElse("") should equal(branch.lobby.get.hours) // TODO Check None situation (lobby is None)
|
||||
foundBranch.driveUpString.getOrElse("") should equal(branch.driveUp.get.hours) // TODO Check None situation (driveUp is None)
|
||||
foundBranch.lobbyString.get.hours should equal(branch.lobby.get.hours) // TODO Check None situation (lobby is None)
|
||||
foundBranch.driveUpString.get.hours should equal(branch.driveUp.get.hours) // TODO Check None situation (driveUp is None)
|
||||
}
|
||||
|
||||
def verifyAtmCreated(atm : SandboxAtmImport) = {
|
||||
@ -208,7 +208,7 @@ class SandboxDataLoadingTest extends FlatSpec with SendServerRequests with Shoul
|
||||
foundAtm.address.line2 should equal(atm.address.line_2)
|
||||
foundAtm.address.line3 should equal(atm.address.line_3)
|
||||
foundAtm.address.city should equal(atm.address.city)
|
||||
foundAtm.address.county should equal(atm.address.county)
|
||||
foundAtm.address.county should equal(Some(atm.address.county))
|
||||
foundAtm.address.state should equal(atm.address.state)
|
||||
|
||||
foundAtm.location.latitude should equal(atm.location.latitude)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user