| Line 69... |
Line 69... |
| 69 |
young.currentAmt = 0;
|
69 |
young.currentAmt = 0;
|
| 70 |
assertEquals(AgendaRuleDecider.Action.LEAVE, decide(young).get(AgendaType.LOW_SALES).action);
|
70 |
assertEquals(AgendaRuleDecider.Action.LEAVE, decide(young).get(AgendaType.LOW_SALES).action);
|
| 71 |
}
|
71 |
}
|
| 72 |
|
72 |
|
| 73 |
@Test
|
73 |
@Test
|
| 74 |
public void purchaseSkippedForRevivalStores() {
|
74 |
public void revivalSuppressesAllDataDrivenAgendasExceptCreditDues() {
|
| 75 |
AgendaRuleDecider.Inputs in = baseInputs();
|
75 |
AgendaRuleDecider.Inputs in = baseInputs();
|
| 76 |
in.revival = true;
|
76 |
in.revival = true;
|
| - |
|
77 |
in.lastBillDaysAgo = 200; // would flag LOW_PURCHASE
|
| - |
|
78 |
in.shortPercentage = 90d; // would flag LOW_INVESTMENT
|
| - |
|
79 |
in.currentAmt = 0; // would flag LOW_SALES
|
| - |
|
80 |
in.oldestLoanAgeDays = 45; // must STILL flag CREDIT_DUES
|
| 77 |
in.lastBillDaysAgo = 200;
|
81 |
in.pendingLoanAmt = 10000;
|
| - |
|
82 |
Map<AgendaType, AgendaRuleDecider.Decision> d = decide(in);
|
| 78 |
assertEquals(AgendaRuleDecider.Action.CLOSE, decide(in).get(AgendaType.LOW_PURCHASE).action);
|
83 |
assertEquals(AgendaRuleDecider.Action.CLOSE, d.get(AgendaType.LOW_PURCHASE).action);
|
| - |
|
84 |
assertEquals(AgendaRuleDecider.Action.CLOSE, d.get(AgendaType.LOW_INVESTMENT).action);
|
| - |
|
85 |
assertEquals(AgendaRuleDecider.Action.CLOSE, d.get(AgendaType.LOW_SALES).action);
|
| - |
|
86 |
assertEquals(AgendaRuleDecider.Action.OPEN, d.get(AgendaType.CREDIT_DUES).action);
|
| 79 |
assertEquals(AgendaRuleDecider.Action.OPEN, decide(in).get(AgendaType.REVIVAL).action);
|
87 |
assertEquals(AgendaRuleDecider.Action.OPEN, d.get(AgendaType.REVIVAL).action);
|
| 80 |
}
|
88 |
}
|
| 81 |
|
89 |
|
| 82 |
@Test
|
90 |
@Test
|
| 83 |
public void purchaseFlagsAtGapAndNeverBilled() {
|
91 |
public void purchaseFlagsAtGapAndNeverBilled() {
|
| 84 |
AgendaRuleDecider.Inputs in = baseInputs();
|
92 |
AgendaRuleDecider.Inputs in = baseInputs();
|