Skip to content

Commit 0b89200

Browse files
Added ComplianceRuleLargeBalance
1 parent 1a920e8 commit 0b89200

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.diffblue.corebanking.compliance.rules;
2+
3+
import com.diffblue.corebanking.account.Account;
4+
5+
public class ComplianceRuleLargeBalance extends ComplianceRule {
6+
public static final long MAX_ACCOUNT_VALUE = 100000;
7+
8+
@Override
9+
public void validateAccountCompliance(final Account account) {
10+
if (account == null) {
11+
throw new IllegalArgumentException();
12+
}
13+
if (account.getCurrentBalance()>=MAX_ACCOUNT_VALUE) {
14+
setCurrentFailedAccount(account);
15+
}
16+
else {
17+
setCurrentPassedAccount(account);
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)