This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-accounting.git

commit e09224f301fcd11aa896c7d04fc906a48275e91a
Author: Myrle Krantz <[email protected]>
AuthorDate: Tue Sep 19 11:01:02 2017 +0200

    Fixing and enhancing tests.
---
 .../test/java/io/mifos/accounting/api/v1/domain/AccountTest.java    | 6 ++++++
 .../java/io/mifos/accounting/api/v1/domain/JournalEntryTest.java    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/api/src/test/java/io/mifos/accounting/api/v1/domain/AccountTest.java 
b/api/src/test/java/io/mifos/accounting/api/v1/domain/AccountTest.java
index 9d64812..a05d4f3 100644
--- a/api/src/test/java/io/mifos/accounting/api/v1/domain/AccountTest.java
+++ b/api/src/test/java/io/mifos/accounting/api/v1/domain/AccountTest.java
@@ -41,6 +41,12 @@ public class AccountTest extends ValidationTest<Account> {
     ret.add(new ValidationTestCase<Account>("nameTooLong")
         .adjustment(x -> x.setName(RandomStringUtils.randomAlphanumeric(257)))
         .valid(false));
+    ret.add(new ValidationTestCase<Account>("validState")
+        .adjustment(x -> x.setState("OPEN"))
+        .valid(true));
+    ret.add(new ValidationTestCase<Account>("validNullState")
+        .adjustment(x -> x.setState(null))
+        .valid(true));
 
     return ret;
   }
diff --git 
a/api/src/test/java/io/mifos/accounting/api/v1/domain/JournalEntryTest.java 
b/api/src/test/java/io/mifos/accounting/api/v1/domain/JournalEntryTest.java
index 72def7c..802977e 100644
--- a/api/src/test/java/io/mifos/accounting/api/v1/domain/JournalEntryTest.java
+++ b/api/src/test/java/io/mifos/accounting/api/v1/domain/JournalEntryTest.java
@@ -46,7 +46,7 @@ public class JournalEntryTest extends 
ValidationTest<JournalEntry> {
             .adjustment(x -> x.getDebtors().add(new Debtor("marvin", 
"-120.00")))
             .valid(false));
     ret.add(new 
ValidationTestCase<JournalEntry>("tooLongTransactionIdentifier")
-            .adjustment(x -> 
x.setTransactionIdentifier(RandomStringUtils.randomAlphanumeric(33)))
+            .adjustment(x -> 
x.setTransactionIdentifier(RandomStringUtils.randomAlphanumeric(2201)))
             .valid(false));
     ret.add(new ValidationTestCase<JournalEntry>("tooLongTransactionType")
         .adjustment(x -> 
x.setTransactionType(RandomStringUtils.randomAlphanumeric(33)))

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to