libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit eec21fe041cedd1bf1ef23e3ed9f5181d5baa965
parent c28a7663a77f6813cac41d5907c0619e572bb5a2
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 24 Jan 2020 16:58:46 +0100

switching from datetime() to long() for dates.

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 4++--
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 4++--
Msandbox/src/test/kotlin/DbTest.kt | 20++++++++++----------
3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt @@ -159,8 +159,8 @@ object BankTransactionsTable : IntIdTableWithAmount() { val counterpart = varchar("counterpart", MAX_ID_LENGTH) val amount = amount("amount") val subject = varchar("subject", MAX_SUBJECT_LENGTH) - val operationDate = datetime("operationDate") - val valueDate = datetime("valueDate") + val operationDate = long("operationDate") + val valueDate = long("valueDate") val localCustomer = reference("localCustomer", BankCustomersTable) } diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -163,8 +163,8 @@ fun sampleData() { counterpart = "IBAN" amount = i subject = "transaction $i" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = customerEntity } } diff --git a/sandbox/src/test/kotlin/DbTest.kt b/sandbox/src/test/kotlin/DbTest.kt @@ -56,8 +56,8 @@ class DbTest { amount = Amount("1") counterpart = "IBAN" subject = "Salary" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = BankCustomerEntity.new { customerName = "employee" } @@ -67,8 +67,8 @@ class DbTest { amount = Amount("1.11") counterpart = "IBAN" subject = "Salary" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = BankCustomerEntity.new { customerName = "employee" } @@ -78,8 +78,8 @@ class DbTest { amount = Amount("1.110000000000") // BigDecimal does not crop the trailing zeros counterpart = "IBAN" subject = "Salary" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = BankCustomerEntity.new { customerName = "employee" } @@ -95,8 +95,8 @@ class DbTest { amount = Amount("1.10001") counterpart = "IBAN" subject = "Salary" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = BankCustomerEntity.new { customerName = "employee" } @@ -118,8 +118,8 @@ class DbTest { amount = Amount("1") counterpart = "IBAN" subject = "Salary" - operationDate = DateTime.now() - valueDate = DateTime.now() + operationDate = DateTime.now().millis + valueDate = DateTime.now().millis localCustomer = BankCustomerEntity.new { customerName = "employee" }