@Test public void testGetAddUpdateMessage_errorcode() throws JAXBException { MCCIIN000002UV01 mCCIIN000002UV01 = (MCCIIN000002UV01) getPIXResObject( "xml/AddSampleErrorCode_MCCIIN000002UV01.xml", PixManagerConstants.ENCODE_STRING); PixManagerBean pixManagerBean = new PixManagerBean(); sut.getAddUpdateMessage(mCCIIN000002UV01, pixManagerBean, PixManagerConstants.PIX_ADD); assertTrue("Actual Add message " + pixManagerBean.getAddMessage(), pixManagerBean.getAddMessage().startsWith("Add Failure! ")); }
public void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }
PixManagerMessageHelper { public void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } } }
PixManagerMessageHelper { public void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  }
PixManagerMessageHelper { public void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  void getAddUpdateMessage(MCCIIN000002UV01 response,
			PixManagerBean pixMgrBean, String msg); void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean,
			String msg); @SuppressWarnings("unchecked") PixManagerBean getQueryMessage(PRPAIN201310UV02 response,
			PixManagerBean pixMgrBean); boolean isSuccess(MCCIIN000002UV01 response); }
PixManagerMessageHelper { public void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  void getAddUpdateMessage(MCCIIN000002UV01 response,
			PixManagerBean pixMgrBean, String msg); void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean,
			String msg); @SuppressWarnings("unchecked") PixManagerBean getQueryMessage(PRPAIN201310UV02 response,
			PixManagerBean pixMgrBean); boolean isSuccess(MCCIIN000002UV01 response);  }