Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testForCoaIdNotFound() {
- String code = "PRE_TAX_30";
- String name = "Prepaid Tax Art 30";
- Long coaId = -99l;
- String datetime = DateUtil.dateTimeNow();
- Long tenantLoginId = 10l;
- Long roleLoginId = 1l;
- String active = GeneralConstants.YES;
- Long userLoginId = 1l;
- Dto inputDto = new Dto();
- inputDto.put("code", code);
- inputDto.put("name", name);
- inputDto.put("coaId", coaId);
- inputDto.put("active", active);
- inputDto.put("tenantLoginId", tenantLoginId);
- inputDto.put("userLoginId", userLoginId);
- inputDto.put("roleLoginId", roleLoginId);
- inputDto.put("datetime", datetime);
- try{
- Dto outputDto = addActivity.execute(inputDto);
- Assert.fail("This addActivity should be error: "+outputDto);
- } catch(CoreException e){
- log.error("Coa Id {0} is not found", e);
- Assert.assertEquals(1, e.getParamValues().length);
- Assert.assertEquals(MasterExceptionConstants.COA_ID_NOT_FOUND, e.getErrorKey());
- } catch (Exception e){
- log.error("Exception{}",e);
- Assert.fail(e.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement