()
| 130 | } |
| 131 | |
| 132 | public void testCQRS() { |
| 133 | // AppUtil appUtil = new AppUtil(); |
| 134 | AService service = (AService) appUtil.getComponentInstance("myaService"); |
| 135 | AggregateRootA aggregateRootA = service.getAggregateRootA("11"); |
| 136 | DomainMessage res = service.commandAandB("11", aggregateRootA, 100); |
| 137 | |
| 138 | long start = System.currentTimeMillis(); |
| 139 | DomainMessage res1 = (DomainMessage) res.getBlockEventResult(); |
| 140 | ParameterVO result = (ParameterVO) res1.getBlockEventResult(); |
| 141 | |
| 142 | long stop = System.currentTimeMillis(); |
| 143 | |
| 144 | AggregateRootB aggregateRootB = service.getAggregateRootB("22"); |
| 145 | Assert.assertEquals(result.getValue(), |
| 146 | aggregateRootB.getState(result.getId())); |
| 147 | System.out.print("\n test CQRS ok \n" + result + " " + (stop - start)); |
| 148 | } |
| 149 | |
| 150 | public void testBankAccount() { |
| 151 | Assert.assertTrue(AccountTransferMain.testTransferFinish()); |
no test coverage detected