@Test public void noLitleTxnId() throws Exception { EcheckCredit echeckcredit = new EcheckCredit(); try { litle.echeckCredit(echeckcredit); fail("Expected exception"); } catch (LitleOnlineException e) { assertTrue( e.getMessage(), e.getMessage().startsWith("Error validating xml data against the schema")); } }
@Test public void missingBilling() throws Exception { EcheckCredit echeckcredit = new EcheckCredit(); echeckcredit.setAmount(12L); echeckcredit.setOrderId("12345"); echeckcredit.setOrderSource(OrderSourceType.ECOMMERCE); EcheckType echeck = new EcheckType(); echeck.setAccType(EcheckAccountTypeEnum.CHECKING); echeck.setAccNum("12345657890"); echeck.setRoutingNum("123456789"); echeck.setCheckNum("123455"); echeckcredit.setEcheck(echeck); try { litle.echeckCredit(echeckcredit); fail("Expected exception"); } catch (LitleOnlineException e) { assertTrue( e.getMessage(), e.getMessage().startsWith("Error validating xml data against the schema")); } }