[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: fix tests (WIP)
From: |
gnunet |
Subject: |
[libeufin] branch master updated: fix tests (WIP) |
Date: |
Fri, 22 Oct 2021 21:02:57 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 3496fcb fix tests (WIP)
3496fcb is described below
commit 3496fcb010495b932dd60c99ffec55b170c31e00
Author: ms <ms@taler.net>
AuthorDate: Fri Oct 22 21:02:54 2021 +0200
fix tests (WIP)
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 2 +-
sandbox/src/test/kotlin/BalanceTest.kt | 14 ++++++++++++--
sandbox/src/test/kotlin/DBTest.kt | 13 ++++++++++---
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
index 4f7ac08..104c5e6 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -354,7 +354,7 @@ class BankAccountTransactionEntity(id: EntityID<Long>) :
LongEntity(id) {
var pmtInfId by BankAccountTransactionsTable.pmtInfId
var direction by BankAccountTransactionsTable.direction
var account by BankAccountEntity referencedOn
BankAccountTransactionsTable.account
- var demobank by DemobankConfigEntity referencedOn
BankAccountsTable.demoBank
+ var demobank by DemobankConfigEntity referencedOn
BankAccountTransactionsTable.demobank
}
/**
diff --git a/sandbox/src/test/kotlin/BalanceTest.kt
b/sandbox/src/test/kotlin/BalanceTest.kt
index 1f09b41..ef0ac19 100644
--- a/sandbox/src/test/kotlin/BalanceTest.kt
+++ b/sandbox/src/test/kotlin/BalanceTest.kt
@@ -17,12 +17,19 @@ class BalanceTest {
BankAccountTransactionsTable,
BankAccountFreshTransactionsTable
)
+ val demobank = DemobankConfigEntity.new {
+ currency = "EUR"
+ bankDebtLimit = 1000000
+ usersDebtLimit = 10000
+ allowRegistrations = true
+ name = "default"
+ }
val one = BankAccountEntity.new {
- name = "Person 1"
iban = "IBAN 1"
bic = "BIC"
label = "label 1"
- currency = "EUR"
+ owner = "test"
+ this.demoBank = demobank
}
BankAccountTransactionEntity.new {
account = one
@@ -39,6 +46,7 @@ class BalanceTest {
pmtInfId = "0"
direction = "CRDT"
accountServicerReference =
"test-account-servicer-reference"
+ this.demobank = demobank
}
BankAccountTransactionEntity.new {
account = one
@@ -55,6 +63,7 @@ class BalanceTest {
pmtInfId = "0"
direction = "CRDT"
accountServicerReference =
"test-account-servicer-reference"
+ this.demobank = demobank
}
BankAccountTransactionEntity.new {
account = one
@@ -71,6 +80,7 @@ class BalanceTest {
pmtInfId = "0"
direction = "DBIT"
accountServicerReference =
"test-account-servicer-reference"
+ this.demobank = demobank
}
assert(java.math.BigDecimal.ONE == balanceForAccount(one))
}
diff --git a/sandbox/src/test/kotlin/DBTest.kt
b/sandbox/src/test/kotlin/DBTest.kt
index 5c99acf..9a08727 100644
--- a/sandbox/src/test/kotlin/DBTest.kt
+++ b/sandbox/src/test/kotlin/DBTest.kt
@@ -17,7 +17,6 @@
* <http://www.gnu.org/licenses/>
*/
-import org.jetbrains.exposed.dao.id.EntityID
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.transactions.transaction
import org.junit.Test
@@ -66,12 +65,19 @@ class DBTest {
BankAccountTransactionsTable,
BankAccountFreshTransactionsTable
)
+ val demobank = DemobankConfigEntity.new {
+ currency = "EUR"
+ bankDebtLimit = 1000000
+ usersDebtLimit = 10000
+ allowRegistrations = true
+ name = "default"
+ }
val bankAccount = BankAccountEntity.new {
iban = "iban"
bic = "bic"
- name = "name"
label = "label"
- currency = "TESTKUDOS"
+ owner = "test"
+ demoBank = demobank
}
BankAccountTransactionEntity.new {
account = bankAccount
@@ -88,6 +94,7 @@ class DBTest {
pmtInfId = "0"
direction = "DBIT"
accountServicerReference =
"test-account-servicer-reference"
+ this.demobank = demobank
}
}
val result = transaction {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: fix tests (WIP),
gnunet <=