@Test public void testParseMessageResponse() { System.out.println("parseMessageResponse"); GatewayRequest message = null; String gatewayResponse = ""; GatewayRequest expResult = null; Set<GatewayResponse> result = dummyHandler.parseMessageResponse(message, gatewayResponse); assertEquals(expResult, result); }
public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responseList = new HashSet<GatewayResponse>(); GatewayResponse response = coreManager.createGatewayResponse(); response.setGatewayRequest(message); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber(message.getRecipientsNumber()); response.setGatewayMessageId(MotechIDGenerator.generateID(10).toString()); response.setRequestId(message.getRequestId()); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responseList.add(response); return responseList; }
DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responseList = new HashSet<GatewayResponse>(); GatewayResponse response = coreManager.createGatewayResponse(); response.setGatewayRequest(message); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber(message.getRecipientsNumber()); response.setGatewayMessageId(MotechIDGenerator.generateID(10).toString()); response.setRequestId(message.getRequestId()); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responseList.add(response); return responseList; } }
DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responseList = new HashSet<GatewayResponse>(); GatewayResponse response = coreManager.createGatewayResponse(); response.setGatewayRequest(message); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber(message.getRecipientsNumber()); response.setGatewayMessageId(MotechIDGenerator.generateID(10).toString()); response.setRequestId(message.getRequestId()); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responseList.add(response); return responseList; }  }
DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responseList = new HashSet<GatewayResponse>(); GatewayResponse response = coreManager.createGatewayResponse(); response.setGatewayRequest(message); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber(message.getRecipientsNumber()); response.setGatewayMessageId(MotechIDGenerator.generateID(10).toString()); response.setRequestId(message.getRequestId()); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responseList.add(response); return responseList; }  Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse); MStatus parseMessageStatus(String gatewayResponse); MStatus lookupStatus(String code); MStatus lookupResponse(String code); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); void setCodeStatusMap(Map<MStatus, String> codeStatusMap); void setCodeResponseMap(Map<MStatus, String> codeResponseMap); }
DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responseList = new HashSet<GatewayResponse>(); GatewayResponse response = coreManager.createGatewayResponse(); response.setGatewayRequest(message); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber(message.getRecipientsNumber()); response.setGatewayMessageId(MotechIDGenerator.generateID(10).toString()); response.setRequestId(message.getRequestId()); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responseList.add(response); return responseList; }  Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse); MStatus parseMessageStatus(String gatewayResponse); MStatus lookupStatus(String code); MStatus lookupResponse(String code); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); void setCodeStatusMap(Map<MStatus, String> codeStatusMap); void setCodeResponseMap(Map<MStatus, String> codeResponseMap);  }