public void testFailurePreviewWithFeeCategoryNotNull() throws Exception { setRequestPathInfo("/feeaction.do"); addRequestParameter("method", "preview"); addRequestParameter("feeName", "CustomerFee"); addRequestParameter(Constants.CURRENTFLOWKEY, flowKey); addRequestParameter("categoryType", FeeCategory.CENTER.getValue().toString()); actionPerform(); Assert.assertEquals(3, getErrorSize()); Assert.assertEquals("Periodic or OneTime Fee", 1, getErrorSize("feeFrequencyType")); Assert.assertEquals("Fee Amount", 1, getErrorSize(FeeConstants.AMOUNT)); Assert.assertEquals("Fee GlCode", 1, getErrorSize(FeeConstants.INVALID_GLCODE)); verifyInputForward(); }
public void testFailurePreviewWith_AmountNotNull() throws Exception { setRequestPathInfo("/feeaction.do"); addRequestParameter("method", "preview"); addRequestParameter("feeName", "CustomerFee"); addRequestParameter("categoryType", FeeCategory.CENTER.getValue().toString()); addRequestParameter("feeFrequencyType", FeeFrequencyType.PERIODIC.getValue().toString()); addRequestParameter("feeRecurrenceType", RecurrenceType.MONTHLY.getValue().toString()); addRequestParameter("monthRecurAfter", "2"); addRequestParameter("amount", "200"); addRequestParameter(Constants.CURRENTFLOWKEY, flowKey); actionPerform(); Assert.assertEquals(1, getErrorSize()); Assert.assertEquals("Fee GlCode", 1, getErrorSize(FeeConstants.INVALID_GLCODE)); verifyInputForward(); }