target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testUndertowHttp2Enabled() { props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); webConfigurer.customize(container); Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.... | @Override public void customize(WebServerFactory server) { setMimeMappings(server); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && server instanceof UndertowServletWebServerFactory) { ((UndertowServletWebServerFactory) server) .addBuilderCustomizers(builder -> builder.set... | WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { @Override public void customize(WebServerFactory server) { setMimeMappings(server); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && server instanceof UndertowServletWebServer... | WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { @Override public void customize(WebServerFactory server) { setMimeMappings(server); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && server instanceof UndertowServletWebServer... | WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { @Override public void customize(WebServerFactory server) { setMimeMappings(server); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && server instanceof UndertowServletWebServer... | WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { @Override public void customize(WebServerFactory server) { setMimeMappings(server); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && server instanceof UndertowServletWebServer... |
@Test public void deserialize_RoleClass_shouldReturnOk() { String jsonRole = getJsonRole(getDefaultRole()); Role expectedRole = getDefaultRole(); Role role = JsonParser.deserialize(jsonRole,Role.class); assertTrue(role.getId().equals(expectedRole.getId())); assertTrue(role.getName().equals(expectedRole.getName())); } | public static <T> T deserialize(String json, Class<T> type) { try { return new ObjectMapper().readValue(json,type); } catch (Exception ex) { log.error(ex.getMessage(),ex); } return null; } | JsonParser { public static <T> T deserialize(String json, Class<T> type) { try { return new ObjectMapper().readValue(json,type); } catch (Exception ex) { log.error(ex.getMessage(),ex); } return null; } } | JsonParser { public static <T> T deserialize(String json, Class<T> type) { try { return new ObjectMapper().readValue(json,type); } catch (Exception ex) { log.error(ex.getMessage(),ex); } return null; } } | JsonParser { public static <T> T deserialize(String json, Class<T> type) { try { return new ObjectMapper().readValue(json,type); } catch (Exception ex) { log.error(ex.getMessage(),ex); } return null; } static String serialize(Object object); static T deserialize(String json, Class<T> type); static T deserialize(String... | JsonParser { public static <T> T deserialize(String json, Class<T> type) { try { return new ObjectMapper().readValue(json,type); } catch (Exception ex) { log.error(ex.getMessage(),ex); } return null; } static String serialize(Object object); static T deserialize(String json, Class<T> type); static T deserialize(String... |
@Test public void testGetByCode() { System.out.println("getByCode"); IncomingMessageFormDefinition result = imfDAO.getByCode(formCode); assertNotNull(result); assertEquals(result.getFormCode(), formCode); System.out.println(result.toString()); } | public IncomingMessageFormDefinition getByCode(String formCode) { logger.debug("variable passed to getByCode: " + formCode); try { Criterion code = Restrictions.eq("formCode", formCode); IncomingMessageFormDefinition definition = (IncomingMessageFormDefinition)this.getSessionFactory().getCurrentSession().createCriteria... | IncomingMessageFormDefinitionDAOImpl extends HibernateGenericDAOImpl<IncomingMessageFormDefinitionImpl> implements IncomingMessageFormDefinitionDAO<IncomingMessageFormDefinitionImpl> { public IncomingMessageFormDefinition getByCode(String formCode) { logger.debug("variable passed to getByCode: " + formCode); try { Crit... | IncomingMessageFormDefinitionDAOImpl extends HibernateGenericDAOImpl<IncomingMessageFormDefinitionImpl> implements IncomingMessageFormDefinitionDAO<IncomingMessageFormDefinitionImpl> { public IncomingMessageFormDefinition getByCode(String formCode) { logger.debug("variable passed to getByCode: " + formCode); try { Crit... | IncomingMessageFormDefinitionDAOImpl extends HibernateGenericDAOImpl<IncomingMessageFormDefinitionImpl> implements IncomingMessageFormDefinitionDAO<IncomingMessageFormDefinitionImpl> { public IncomingMessageFormDefinition getByCode(String formCode) { logger.debug("variable passed to getByCode: " + formCode); try { Crit... | IncomingMessageFormDefinitionDAOImpl extends HibernateGenericDAOImpl<IncomingMessageFormDefinitionImpl> implements IncomingMessageFormDefinitionDAO<IncomingMessageFormDefinitionImpl> { public IncomingMessageFormDefinition getByCode(String formCode) { logger.debug("variable passed to getByCode: " + formCode); try { Crit... |
@Test public void shouldSetMessageStatusToCannotConnectWhenResponseMessageHasErrorWithCode901() { Set<GatewayResponse> responses = messageHandler.parseMessageResponse(gatewayRequest, "Status: Retry Sending\nERROR: 901"); assertNotNull(responses); assertEquals(1, responses.size()); Iterator<GatewayResponse> iterator = r... | public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responses = new HashSet<GatewayResponse>();... | RancardGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | RancardGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | RancardGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | RancardGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... |
@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.setG... | 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>(); GatewayResp... | 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>(); GatewayResp... | 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>(); GatewayResp... | 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>(); GatewayResp... |
@Test public void testParseMessageStatus() { System.out.println("parseMessageStatus"); String messageStatus = "004"; MStatus expResult = MStatus.PENDING; MStatus result = dummyHandler.parseMessageStatus(messageStatus); assertEquals(expResult, result); } | public MStatus parseMessageStatus(String gatewayResponse) { String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } Set<GatewayRe... | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } Set<GatewayRe... |
@Test public void testLookupStatus() { System.out.println("lookupStatus"); String messageStatus = "004"; MStatus expResult = MStatus.DELIVERED; MStatus result = dummyHandler.lookupStatus(messageStatus); assertEquals(expResult, result); } | public MStatus lookupStatus(String code) { if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code) { if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code) { if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code) { if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } Set<GatewayRe... | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code) { if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } Set<GatewayRe... |
@Test public void testLookupResponse() { System.out.println("lookupResponse"); String messageStatus = "ID: somestatus"; MStatus expResult = MStatus.SCHEDULED; MStatus result = dummyHandler.lookupResponse(messageStatus); assertEquals(expResult, result); } | public MStatus lookupResponse(String code) { if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code) { if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code) { if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } } | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code) { if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } Set<G... | DummyGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code) { if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } Set<G... |
@Test public void testSetType() { IVRNotificationMapping mapping = new IVRNotificationMapping(); mapping.setType(IVRNotificationMapping.INFORMATIONAL); assertEquals(IVRNotificationMapping.INFORMATIONAL, mapping.getType()); mapping.setType(IVRNotificationMapping.REMINDER); assertEquals(IVRNotificationMapping.REMINDER, m... | public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; } | IVRNotificationMapping { public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; } } | IVRNotificationMapping { public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; } } | IVRNotificationMapping { public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; } long getId(); void setId(long id); String getType(); void setType(String type); String getIvrEntityName(); void setIvrEntityName(String ivrEnt... | IVRNotificationMapping { public void setType(String type) { this.type = null; if ( type.equalsIgnoreCase(INFORMATIONAL) || type.equalsIgnoreCase(REMINDER) ) this.type = type; } long getId(); void setId(long id); String getType(); void setType(String type); String getIvrEntityName(); void setIvrEntityName(String ivrEnt... |
@Test public void testSendMessage() { GatewayRequest gatewayRequest = getGatewayRequestTemplate(); List<IVRCallSession> daoResponse = new ArrayList<IVRCallSession>(); IVRDAO mockIvrDao = createMock(IVRDAO.class); intellivrBean.setIvrDao(mockIvrDao); Integer[] expectedStates = {IVRCallSession.OPEN}; expect(mockIvrDao.lo... | @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" + gatewayRequest); String recipientID = gatewayRequest.getMessageRequest().getRecipientId(); String phone = gatewayRequest.getRecipientsNumber(); Stri... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... |
@Test public void testSendMessageNullRecipientId() { GatewayRequest gr = getGatewayRequestTemplate(); gr.getMessageRequest().setRecipientId(null); Set<GatewayResponse> actualGrsSet = intellivrBean.sendMessage(gr); for ( GatewayResponse r : actualGrsSet ) assertEquals(StatusType.ERROR.value(), r.getResponseText()); } | @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" + gatewayRequest); String recipientID = gatewayRequest.getMessageRequest().getRecipientId(); String phone = gatewayRequest.getRecipientsNumber(); Stri... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... |
@Test public void testSendMessageNullPhone() { GatewayRequest gr = getGatewayRequestTemplate(); gr.setRecipientsNumber(null); Set<GatewayResponse> actualGrsSet = intellivrBean.sendMessage(gr); for ( GatewayResponse r : actualGrsSet ) assertEquals(StatusType.ERROR.value(), r.getResponseText()); } | @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" + gatewayRequest); String recipientID = gatewayRequest.getMessageRequest().getRecipientId(); String phone = gatewayRequest.getRecipientsNumber(); Stri... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... |
@Test public void testSendMessageTextMessage() { GatewayRequest gr = getGatewayRequestTemplate(); gr.getMessageRequest().setMessageType(MessageType.TEXT); Set<GatewayResponse> actualGrsSet = intellivrBean.sendMessage(gr); for ( GatewayResponse r : actualGrsSet ) assertEquals(StatusType.ERROR.value(), r.getResponseText(... | @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" + gatewayRequest); String recipientID = gatewayRequest.getMessageRequest().getRecipientId(); String phone = gatewayRequest.getRecipientsNumber(); Stri... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { Set<GatewayResponse> responses = null; try { log.debug("Received GatewayRequest:" ... |
@Test public void testCreateCommandAction() { System.out.println("createCommandAction"); CommandAction result = impManager.createCommandAction(); assertNotNull(result); } | public CommandAction createCommandAction() { return (CommandAction)context.getBean("formCmdAxn"); } | IMPManagerImpl implements ApplicationContextAware, IMPManager { public CommandAction createCommandAction() { return (CommandAction)context.getBean("formCmdAxn"); } } | IMPManagerImpl implements ApplicationContextAware, IMPManager { public CommandAction createCommandAction() { return (CommandAction)context.getBean("formCmdAxn"); } } | IMPManagerImpl implements ApplicationContextAware, IMPManager { public CommandAction createCommandAction() { return (CommandAction)context.getBean("formCmdAxn"); } IMPService createIMPService(); IncomingMessageParser createIncomingMessageParser(); IncomingMessageXMLParser createIncomingMessageXMLParser(); IncomingMess... | IMPManagerImpl implements ApplicationContextAware, IMPManager { public CommandAction createCommandAction() { return (CommandAction)context.getBean("formCmdAxn"); } IMPService createIMPService(); IncomingMessageParser createIncomingMessageParser(); IncomingMessageXMLParser createIncomingMessageXMLParser(); IncomingMess... |
@Test public void testProcessOpenSessions() { Date now = new Date(); Date oneMinuteAgo = addToDate(now, GregorianCalendar.MINUTE, -1); Date oneMinuteLessBundlingDelayAgo = addToDate(now, GregorianCalendar.MINUTE, (int)intellivrBean.getBundlingDelay()*-1); IVRCallSession session = new IVRCallSession(recipientId1, phone1... | @Transactional public void processOpenSessions() { log.debug("Start processing OPEN IVRCallSessions"); Integer[] states = {IVRCallSession.OPEN}; List<IVRCallSession> sessions = ivrDao.loadIVRCallSessionsByStateNextAttemptBeforeDate(states, new Date()); for (IVRCallSession session : sessions) { log.debug("Changing to SE... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processOpenSessions() { log.debug("Start processing OPEN IVRCallSessions"); Integer[] states = {IVRCallSession.OPEN}; List<IVRCallSession> sess... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processOpenSessions() { log.debug("Start processing OPEN IVRCallSessions"); Integer[] states = {IVRCallSession.OPEN}; List<IVRCallSession> sess... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processOpenSessions() { log.debug("Start processing OPEN IVRCallSessions"); Integer[] states = {IVRCallSession.OPEN}; List<IVRCallSession> sess... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processOpenSessions() { log.debug("Start processing OPEN IVRCallSessions"); Integer[] states = {IVRCallSession.OPEN}; List<IVRCallSession> sess... |
@Test public void testProcessWaitingSessions() { Date now = new Date(); Date oneMinuteAgo = addToDate(now, GregorianCalendar.MINUTE, -1); Date oneMinuteLessBundlingDelayAgo = addToDate(now, GregorianCalendar.MINUTE, (int)intellivrBean.getBundlingDelay()*-1); IVRCallSession session = new IVRCallSession(recipientId1, pho... | @Transactional public void processWaitingSessions() { log.debug("Start processing SEND_WAIT IVRCallSessions"); Integer[] states = {IVRCallSession.SEND_WAIT}; List<IVRCallSession> sessions = ivrDao.loadIVRCallSessionsByStateNextAttemptBeforeDate(states, new Date()); for (IVRCallSession session : sessions) ivrCallRequest... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processWaitingSessions() { log.debug("Start processing SEND_WAIT IVRCallSessions"); Integer[] states = {IVRCallSession.SEND_WAIT}; List<IVRCall... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processWaitingSessions() { log.debug("Start processing SEND_WAIT IVRCallSessions"); Integer[] states = {IVRCallSession.SEND_WAIT}; List<IVRCall... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processWaitingSessions() { log.debug("Start processing SEND_WAIT IVRCallSessions"); Integer[] states = {IVRCallSession.SEND_WAIT}; List<IVRCall... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public void processWaitingSessions() { log.debug("Start processing SEND_WAIT IVRCallSessions"); Integer[] states = {IVRCallSession.SEND_WAIT}; List<IVRCall... |
@Test public void testHandleRequestNonNumericId(){ GetIVRConfigRequest request = new GetIVRConfigRequest(); request.setUserid("NaN"); ResponseType expectedResponse = new ResponseType(); expectedResponse.setErrorCode(ErrorCodeType.MOTECH_INVALID_USER_ID); expectedResponse.setStatus(StatusType.ERROR); ResponseType actual... | @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } } | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } } | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } @Transactional void init()... | IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } @Transactional void init()... |
@Test public void testLookupStatus() { for ( String code : statusCodes.keySet()) assertEquals(statusCodes.get(code), intellIVRMessageHandler.lookupStatus(code)); } | public MStatus lookupStatus(String code) { MStatus status = responseMap.get(code); return status != null ? status : defaultStatus; } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupStatus(String code) { MStatus status = responseMap.get(code); return status != null ? status : defaultStatus; } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupStatus(String code) { MStatus status = responseMap.get(code); return status != null ? status : defaultStatus; } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupStatus(String code) { MStatus status = responseMap.get(code); return status != null ? status : defaultStatus; } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMessage); MStatus parseMessageS... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupStatus(String code) { MStatus status = responseMap.get(code); return status != null ? status : defaultStatus; } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMessage); MStatus parseMessageS... |
@Test public void testLookupResponse() { for ( String code : statusCodes.keySet()) assertEquals(statusCodes.get(code), intellIVRMessageHandler.lookupResponse(code)); } | public MStatus lookupResponse(String code) { MStatus responseStatus = responseMap.get(code); return responseStatus != null ? responseStatus : defaultResponse; } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupResponse(String code) { MStatus responseStatus = responseMap.get(code); return responseStatus != null ? responseStatus : defaultResponse; } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupResponse(String code) { MStatus responseStatus = responseMap.get(code); return responseStatus != null ? responseStatus : defaultResponse; } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupResponse(String code) { MStatus responseStatus = responseMap.get(code); return responseStatus != null ? responseStatus : defaultResponse; } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMes... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus lookupResponse(String code) { MStatus responseStatus = responseMap.get(code); return responseStatus != null ? responseStatus : defaultResponse; } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMes... |
@Test public void testParseMessageStatus() { for ( String code : statusCodes.keySet()) assertEquals(statusCodes.get(code), intellIVRMessageHandler.parseMessageStatus(code)); } | public MStatus parseMessageStatus(String messageStatus) { return lookupStatus(messageStatus); } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus parseMessageStatus(String messageStatus) { return lookupStatus(messageStatus); } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus parseMessageStatus(String messageStatus) { return lookupStatus(messageStatus); } } | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus parseMessageStatus(String messageStatus) { return lookupStatus(messageStatus); } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMessage); MStatus parseMessageStatus(String messageStatus); MStatus ... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public MStatus parseMessageStatus(String messageStatus) { return lookupStatus(messageStatus); } Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest,
String statusMessage); MStatus parseMessageStatus(String messageStatus); MStatus ... |
@Test public void testParseMessageResponse() { MessageRequest mr1 = new MessageRequestImpl(); mr1.setId(31000000001l); mr1.setRecipientId("123456789"); mr1.setRequestId("mr1"); GatewayRequest r1 = new GatewayRequestImpl(); r1.setId(31000000002l); r1.setMessageRequest(mr1); r1.setRequestId(mr1.getRequestId()); r1.setMes... | public Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest, String statusMessage) { Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); GatewayResponse gwResponse = coreManager.createGatewayResponse(); gwResponse.setGatewayRequest(gatewayRequest); gwResponse.setGatewayMessageId(gatewayR... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest, String statusMessage) { Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); GatewayResponse gwResponse = coreManager.createGatewayResponse(); gwResponse.setGatew... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest, String statusMessage) { Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); GatewayResponse gwResponse = coreManager.createGatewayResponse(); gwResponse.setGatew... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest, String statusMessage) { Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); GatewayResponse gwResponse = coreManager.createGatewayResponse(); gwResponse.setGatew... | IntellIVRGatewayMessageHandler implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest gatewayRequest, String statusMessage) { Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); GatewayResponse gwResponse = coreManager.createGatewayResponse(); gwResponse.setGatew... |
@Test public void testIVRSession() { String userid = "1"; String phone = "5555555555"; String language = "English"; Language english = new LanguageImpl(); english.setCode("en"); english.setId(29000000001l); english.setName("English"); NotificationType n1 = new NotificationTypeImpl(); n1.setId(1L); MessageRequest mr1 = ... | public IVRSession(String userId, String phone, String language) { this.sessionId = UUID.randomUUID().toString(); this.userId = userId; this.phone = phone; this.language = language; this.userInitiated = false; requests = new ArrayList<GatewayRequest>(); } | IVRSession implements Serializable { public IVRSession(String userId, String phone, String language) { this.sessionId = UUID.randomUUID().toString(); this.userId = userId; this.phone = phone; this.language = language; this.userInitiated = false; requests = new ArrayList<GatewayRequest>(); } } | IVRSession implements Serializable { public IVRSession(String userId, String phone, String language) { this.sessionId = UUID.randomUUID().toString(); this.userId = userId; this.phone = phone; this.language = language; this.userInitiated = false; requests = new ArrayList<GatewayRequest>(); } IVRSession(String userId, St... | IVRSession implements Serializable { public IVRSession(String userId, String phone, String language) { this.sessionId = UUID.randomUUID().toString(); this.userId = userId; this.phone = phone; this.language = language; this.userInitiated = false; requests = new ArrayList<GatewayRequest>(); } IVRSession(String userId, St... | IVRSession implements Serializable { public IVRSession(String userId, String phone, String language) { this.sessionId = UUID.randomUUID().toString(); this.userId = userId; this.phone = phone; this.language = language; this.userInitiated = false; requests = new ArrayList<GatewayRequest>(); } IVRSession(String userId, St... |
@Test public void testCreateGatewayMessageHandler() { System.out.println("createGatewayMessageHandler"); GatewayMessageHandler result = ompManager.createGatewayMessageHandler(); assertNotNull(result); } | public GatewayMessageHandler createGatewayMessageHandler() { try{ return (GatewayMessageHandler)context.getBean("orserveHandler"); } catch(Exception ex){ logger.error("GatewayMessageHandler creation failed", ex); return null; } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayMessageHandler createGatewayMessageHandler() { try{ return (GatewayMessageHandler)context.getBean("orserveHandler"); } catch(Exception ex){ logger.error("GatewayMessageHandler creation failed", ex); return null; } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayMessageHandler createGatewayMessageHandler() { try{ return (GatewayMessageHandler)context.getBean("orserveHandler"); } catch(Exception ex){ logger.error("GatewayMessageHandler creation failed", ex); return null; } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayMessageHandler createGatewayMessageHandler() { try{ return (GatewayMessageHandler)context.getBean("orserveHandler"); } catch(Exception ex){ logger.error("GatewayMessageHandler creation failed", ex); return null; } } void setApplicationContex... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayMessageHandler createGatewayMessageHandler() { try{ return (GatewayMessageHandler)context.getBean("orserveHandler"); } catch(Exception ex){ logger.error("GatewayMessageHandler creation failed", ex); return null; } } void setApplicationContex... |
@Test public void testCreateGatewayManager() { System.out.println("createGatewayManager"); GatewayManager result = ompManager.createGatewayManager(); assertNotNull(result); } | public GatewayManager createGatewayManager() { try{ return (GatewayManager)context.getBean("orserveGateway"); } catch(Exception ex){ logger.fatal("GatewayManager creation failed", ex); throw new RuntimeException("Unable to create gateway"); } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayManager createGatewayManager() { try{ return (GatewayManager)context.getBean("orserveGateway"); } catch(Exception ex){ logger.fatal("GatewayManager creation failed", ex); throw new RuntimeException("Unable to create gateway"); } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayManager createGatewayManager() { try{ return (GatewayManager)context.getBean("orserveGateway"); } catch(Exception ex){ logger.fatal("GatewayManager creation failed", ex); throw new RuntimeException("Unable to create gateway"); } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayManager createGatewayManager() { try{ return (GatewayManager)context.getBean("orserveGateway"); } catch(Exception ex){ logger.fatal("GatewayManager creation failed", ex); throw new RuntimeException("Unable to create gateway"); } } void setAp... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public GatewayManager createGatewayManager() { try{ return (GatewayManager)context.getBean("orserveGateway"); } catch(Exception ex){ logger.fatal("GatewayManager creation failed", ex); throw new RuntimeException("Unable to create gateway"); } } void setAp... |
@Test public void testInit() throws Exception { String resource = "MoTechDataEntry"; FormDefinitionServiceImpl fds = new FormDefinitionServiceImpl(); Set resources = new HashSet(); resources.add(resource); fds.setOxdFormDefResources(resources); fds.init(); Assert.assertEquals(1, fds.getStudies().size()); Assert.assertE... | public void init() throws Exception { for (String resource : getOxdFormDefResources()) { int index = resource.lastIndexOf("/"); String studyName = resource.substring(index + 1); List<File> fileList = getFileList(resource); if (fileList == null || fileList.isEmpty()) throw new FileNotFoundException(" No files in the dir... | FormDefinitionServiceImpl implements FormDefinitionService,
StudyDefinitionService, UserDefinitionService { public void init() throws Exception { for (String resource : getOxdFormDefResources()) { int index = resource.lastIndexOf("/"); String studyName = resource.substring(index + 1); List<File> fileList = getF... | FormDefinitionServiceImpl implements FormDefinitionService,
StudyDefinitionService, UserDefinitionService { public void init() throws Exception { for (String resource : getOxdFormDefResources()) { int index = resource.lastIndexOf("/"); String studyName = resource.substring(index + 1); List<File> fileList = getF... | FormDefinitionServiceImpl implements FormDefinitionService,
StudyDefinitionService, UserDefinitionService { public void init() throws Exception { for (String resource : getOxdFormDefResources()) { int index = resource.lastIndexOf("/"); String studyName = resource.substring(index + 1); List<File> fileList = getF... | FormDefinitionServiceImpl implements FormDefinitionService,
StudyDefinitionService, UserDefinitionService { public void init() throws Exception { for (String resource : getOxdFormDefResources()) { int index = resource.lastIndexOf("/"); String studyName = resource.substring(index + 1); List<File> fileList = getF... |
@Test public void testCreateCacheService() { System.out.println("createCacheService"); CacheService result = ompManager.createCacheService(); assertNotNull(result); } | public CacheService createCacheService() { try{ return (CacheService)context.getBean("smsCache"); } catch(Exception ex){ logger.fatal("CacheService creation failed", ex); throw new RuntimeException("Unable to initialize cache"); } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public CacheService createCacheService() { try{ return (CacheService)context.getBean("smsCache"); } catch(Exception ex){ logger.fatal("CacheService creation failed", ex); throw new RuntimeException("Unable to initialize cache"); } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public CacheService createCacheService() { try{ return (CacheService)context.getBean("smsCache"); } catch(Exception ex){ logger.fatal("CacheService creation failed", ex); throw new RuntimeException("Unable to initialize cache"); } } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public CacheService createCacheService() { try{ return (CacheService)context.getBean("smsCache"); } catch(Exception ex){ logger.fatal("CacheService creation failed", ex); throw new RuntimeException("Unable to initialize cache"); } } void setApplicationCon... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public CacheService createCacheService() { try{ return (CacheService)context.getBean("smsCache"); } catch(Exception ex){ logger.fatal("CacheService creation failed", ex); throw new RuntimeException("Unable to initialize cache"); } } void setApplicationCon... |
@Test public void testCreateMessagingService() { System.out.println("createMessagingService"); MobileMessagingService result = ompManager.createMessagingService(); assertNotNull(result); } | public MobileMessagingService createMessagingService() { try{ return (MobileMessagingService)context.getBean("smsService"); } catch(Exception ex){ logger.fatal("MobileMessagingService creation failed", ex); throw new RuntimeException("Unable to initialize messaging service"); } } | OMPManagerImpl implements OMPManager, ApplicationContextAware { public MobileMessagingService createMessagingService() { try{ return (MobileMessagingService)context.getBean("smsService"); } catch(Exception ex){ logger.fatal("MobileMessagingService creation failed", ex); throw new RuntimeException("Unable to initialize ... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public MobileMessagingService createMessagingService() { try{ return (MobileMessagingService)context.getBean("smsService"); } catch(Exception ex){ logger.fatal("MobileMessagingService creation failed", ex); throw new RuntimeException("Unable to initialize ... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public MobileMessagingService createMessagingService() { try{ return (MobileMessagingService)context.getBean("smsService"); } catch(Exception ex){ logger.fatal("MobileMessagingService creation failed", ex); throw new RuntimeException("Unable to initialize ... | OMPManagerImpl implements OMPManager, ApplicationContextAware { public MobileMessagingService createMessagingService() { try{ return (MobileMessagingService)context.getBean("smsService"); } catch(Exception ex){ logger.fatal("MobileMessagingService creation failed", ex); throw new RuntimeException("Unable to initialize ... |
@SuppressWarnings("unchecked") @Test public void testParseMessageResponse(){ Set<GatewayResponse> response = new HashSet<GatewayResponse>(); expect(voiceHandler.parseMessageResponse(voiceGatewayRequest, "OK")).andReturn(response); replay(voiceHandler); compositeHandler.parseMessageResponse(voiceGatewayRequest, "OK"); v... | @SuppressWarnings("unchecked") public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if ( message .getMessageRequest() .getMessageType() == MessageType.VOICE) return voiceHandler.parseMessageResponse(message, gatewayResponse); if ( message .getMessageRequest() .getMessageTyp... | CompositeGatewayMessageHandler implements GatewayMessageHandler { @SuppressWarnings("unchecked") public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if ( message .getMessageRequest() .getMessageType() == MessageType.VOICE) return voiceHandler.parseMessageResponse(message, ... | CompositeGatewayMessageHandler implements GatewayMessageHandler { @SuppressWarnings("unchecked") public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if ( message .getMessageRequest() .getMessageType() == MessageType.VOICE) return voiceHandler.parseMessageResponse(message, ... | CompositeGatewayMessageHandler implements GatewayMessageHandler { @SuppressWarnings("unchecked") public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if ( message .getMessageRequest() .getMessageType() == MessageType.VOICE) return voiceHandler.parseMessageResponse(message, ... | CompositeGatewayMessageHandler implements GatewayMessageHandler { @SuppressWarnings("unchecked") public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { if ( message .getMessageRequest() .getMessageType() == MessageType.VOICE) return voiceHandler.parseMessageResponse(message, ... |
@Test public void testSendMessage() { System.out.println("sendMessage"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000"); messageDetails.setGatewayRequestDetails(mockGatewayRequestD... | public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { if (log.isInfoEnabled()) { log.info(messageDetails.getId() + "|" + messageDetails.getRecipientsNumber() + "|" + messageDetails.getMessage()); } String msgResponse = (messageDetails.getRecipientsNumber().length() < 8) ? "failed" : "ID: " + MotechID... | DummyGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { if (log.isInfoEnabled()) { log.info(messageDetails.getId() + "|" + messageDetails.getRecipientsNumber() + "|" + messageDetails.getMessage()); } String msgResponse = (messageDetails.getRecipientsN... | DummyGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { if (log.isInfoEnabled()) { log.info(messageDetails.getId() + "|" + messageDetails.getRecipientsNumber() + "|" + messageDetails.getMessage()); } String msgResponse = (messageDetails.getRecipientsN... | DummyGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { if (log.isInfoEnabled()) { log.info(messageDetails.getId() + "|" + messageDetails.getRecipientsNumber() + "|" + messageDetails.getMessage()); } String msgResponse = (messageDetails.getRecipientsN... | DummyGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { if (log.isInfoEnabled()) { log.info(messageDetails.getId() + "|" + messageDetails.getRecipientsNumber() + "|" + messageDetails.getMessage()); } String msgResponse = (messageDetails.getRecipientsN... |
@Test public void testGetMessageStatus() { System.out.println("getMessageStatus"); GatewayResponseImpl response = new GatewayResponseImpl(); response.setGatewayMessageId("testId"); String result = instance.getMessageStatus(response); assertNotNull(result); } | public String getMessageStatus(GatewayResponse response) { return "004"; } | DummyGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { return "004"; } } | DummyGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { return "004"; } } | DummyGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { return "004"; } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); void setSleepTime(long sleepTime); long getSleepTime(); String getMessageStatus(GatewayResponse response); MStatus mapMessageSt... | DummyGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { return "004"; } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); void setSleepTime(long sleepTime); long getSleepTime(); String getMessageStatus(GatewayResponse response); MStatus mapMessageSt... |
@Test public void testMapMessageStatus() { System.out.println("mapMessageStatus"); GatewayResponseImpl response = new GatewayResponseImpl(); response.setResponseText("Some gateway response message"); expect( mockHandler.parseMessageStatus((String) anyObject()) ).andReturn(MStatus.DELIVERED); replay(mockHandler); MStatu... | public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } | DummyGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } } | DummyGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } } | DummyGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); void setSleepTime(long sleepTime); long getSleepTime(); String getMess... | DummyGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); void setSleepTime(long sleepTime); long getSleepTime(); String getMess... |
@Test public void shouldReturnStringRepresentation() throws UnsupportedEncodingException { PostData data = postData(); assertEquals("&user=john&password=password&sender=1982&text=hello+world",data.toString()); } | public String toString(){ StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ builder.append("&").append(key).append("=").append(data.get(key)); } return builder.toString(); } | PostData { public String toString(){ StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ builder.append("&").append(key).append("=").append(data.get(key)); } return builder.toString(); } } | PostData { public String toString(){ StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ builder.append("&").append(key).append("=").append(data.get(key)); } return builder.toString(); } } | PostData { public String toString(){ StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ builder.append("&").append(key).append("=").append(data.get(key)); } return builder.toString(); } void add(String attribute, String value, String urlEncoding); void add(String attribute, String value); St... | PostData { public String toString(){ StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ builder.append("&").append(key).append("=").append(data.get(key)); } return builder.toString(); } void add(String attribute, String value, String urlEncoding); void add(String attribute, String value); St... |
@Test public void shouldNotIncludeRestrictedValuesInStringRepresentation() throws UnsupportedEncodingException { PostData data = postData(); assertEquals("&sender=1982&text=hello+world",data.without("password","user")); } | public String without(String... values){ List<String> ignoreList = Arrays.asList(values); StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ if(! ignoreList.contains(key)){ builder.append("&").append(key).append("=").append(data.get(key)); } } return builder.toString(); } | PostData { public String without(String... values){ List<String> ignoreList = Arrays.asList(values); StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ if(! ignoreList.contains(key)){ builder.append("&").append(key).append("=").append(data.get(key)); } } return builder.toString(); } } | PostData { public String without(String... values){ List<String> ignoreList = Arrays.asList(values); StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ if(! ignoreList.contains(key)){ builder.append("&").append(key).append("=").append(data.get(key)); } } return builder.toString(); } } | PostData { public String without(String... values){ List<String> ignoreList = Arrays.asList(values); StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ if(! ignoreList.contains(key)){ builder.append("&").append(key).append("=").append(data.get(key)); } } return builder.toString(); } void add... | PostData { public String without(String... values){ List<String> ignoreList = Arrays.asList(values); StringBuilder builder = new StringBuilder(); for(String key : data.keySet()){ if(! ignoreList.contains(key)){ builder.append("&").append(key).append("=").append(data.get(key)); } } return builder.toString(); } void add... |
@Test public void testUpdateStatusNull() { store.updateStatus(id, newStatus); store.updateStatus(id, null); assertFalse("Should not contain entry " + id, store.statusMap .containsKey(id)); } | public void updateStatus(String id, String status) { try { if (status == null) { statusMap.remove(id); return; } MessageStatusEntry statusEntry = statusMap.get(id); if (statusEntry == null) statusMap.put(id, statusEntry = new MessageStatusEntry()); statusEntry.setStatus(status); statusEntry.setLastUpdate(System.current... | InMemoryMessageStatusStore implements MessageStatusStore { public void updateStatus(String id, String status) { try { if (status == null) { statusMap.remove(id); return; } MessageStatusEntry statusEntry = statusMap.get(id); if (statusEntry == null) statusMap.put(id, statusEntry = new MessageStatusEntry()); statusEntry.... | InMemoryMessageStatusStore implements MessageStatusStore { public void updateStatus(String id, String status) { try { if (status == null) { statusMap.remove(id); return; } MessageStatusEntry statusEntry = statusMap.get(id); if (statusEntry == null) statusMap.put(id, statusEntry = new MessageStatusEntry()); statusEntry.... | InMemoryMessageStatusStore implements MessageStatusStore { public void updateStatus(String id, String status) { try { if (status == null) { statusMap.remove(id); return; } MessageStatusEntry statusEntry = statusMap.get(id); if (statusEntry == null) statusMap.put(id, statusEntry = new MessageStatusEntry()); statusEntry.... | InMemoryMessageStatusStore implements MessageStatusStore { public void updateStatus(String id, String status) { try { if (status == null) { statusMap.remove(id); return; } MessageStatusEntry statusEntry = statusMap.get(id); if (statusEntry == null) statusMap.put(id, statusEntry = new MessageStatusEntry()); statusEntry.... |
@Test public void testGetStatus() { store.updateStatus(id, newStatus); assertTrue("Map should contain key " + id, store.statusMap .containsKey(id)); assertEquals(newStatus, store.statusMap.get(id).getStatus()); } | public String getStatus(String id) { try { MessageStatusEntry statusEntry = statusMap.get(id); return statusEntry == null ? null : statusEntry.getStatus(); } finally { requestCleanup(); } } | InMemoryMessageStatusStore implements MessageStatusStore { public String getStatus(String id) { try { MessageStatusEntry statusEntry = statusMap.get(id); return statusEntry == null ? null : statusEntry.getStatus(); } finally { requestCleanup(); } } } | InMemoryMessageStatusStore implements MessageStatusStore { public String getStatus(String id) { try { MessageStatusEntry statusEntry = statusMap.get(id); return statusEntry == null ? null : statusEntry.getStatus(); } finally { requestCleanup(); } } } | InMemoryMessageStatusStore implements MessageStatusStore { public String getStatus(String id) { try { MessageStatusEntry statusEntry = statusMap.get(id); return statusEntry == null ? null : statusEntry.getStatus(); } finally { requestCleanup(); } } void setTtl(long ttl); long getTtl(); long getCleanupInterval(); void ... | InMemoryMessageStatusStore implements MessageStatusStore { public String getStatus(String id) { try { MessageStatusEntry statusEntry = statusMap.get(id); return statusEntry == null ? null : statusEntry.getStatus(); } finally { requestCleanup(); } } void setTtl(long ttl); long getTtl(); long getCleanupInterval(); void ... |
@Test public void testUniqueMessage() throws DuplicateMessageException { IncomingMessage newMsg = new IncomingMessageImpl(); expect(mockCoreMgr.createIncomingMessageDAO()).andReturn(mockMsgDao); expect(mockMsgDao.getByContentNonDuplicatable(message)).andReturn(null); expect(mockParser.parseRequest(message)).andReturn(n... | @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = coreManager .createIncomingMessageDAO(); Calendar ca... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... |
@Test public void testGetMessageStatus(){ expect(voiceManager.getMessageStatus(voiceGatewayResponse)).andReturn("OK"); replay(voiceManager); compositeGateway.getMessageStatus(voiceGatewayResponse); verify(voiceManager); reset(voiceManager); expect(textManager.getMessageStatus(textGatewayResponse)).andReturn("OK"); repl... | public String getMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.getMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.TEXT ) { return ... | CompositeGatewayManager implements GatewayManager { public String getMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.getMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest... | CompositeGatewayManager implements GatewayManager { public String getMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.getMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest... | CompositeGatewayManager implements GatewayManager { public String getMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.getMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest... | CompositeGatewayManager implements GatewayManager { public String getMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.getMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest... |
@Test public void testMapMessageStatus(){ expect(voiceManager.mapMessageStatus(voiceGatewayResponse)).andReturn(MStatus.PENDING); replay(voiceManager); compositeGateway.mapMessageStatus(voiceGatewayResponse); verify(voiceManager); reset(voiceManager); expect(textManager.mapMessageStatus(textGatewayResponse)).andReturn(... | public MStatus mapMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.mapMessageStatus(response); } if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.TEXT ) { return... | CompositeGatewayManager implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.mapMessageStatus(response); } if ( response .getGatewayRequest() .getMessageReques... | CompositeGatewayManager implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.mapMessageStatus(response); } if ( response .getGatewayRequest() .getMessageReques... | CompositeGatewayManager implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.mapMessageStatus(response); } if ( response .getGatewayRequest() .getMessageReques... | CompositeGatewayManager implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { if ( response .getGatewayRequest() .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.mapMessageStatus(response); } if ( response .getGatewayRequest() .getMessageReques... |
@SuppressWarnings("unchecked") @Test public void testSendMessage() { Set<GatewayResponse> voiceResponseSet = new HashSet<GatewayResponse>(); voiceResponseSet.add(voiceGatewayResponse); expect(voiceManager.sendMessage(voiceGatewayRequest)).andReturn(voiceResponseSet); replay(voiceManager); compositeGateway.sendMessage(v... | @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { if ( gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.sendMessage(gatewayRequest); } if ( gatewayRequest .getMessageRequest() .getMessageType() ... | CompositeGatewayManager implements GatewayManager { @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { if ( gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.sendMessage(gatewayRequest); } if ( ga... | CompositeGatewayManager implements GatewayManager { @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { if ( gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.sendMessage(gatewayRequest); } if ( ga... | CompositeGatewayManager implements GatewayManager { @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { if ( gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.sendMessage(gatewayRequest); } if ( ga... | CompositeGatewayManager implements GatewayManager { @Transactional @SuppressWarnings("unchecked") public Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest) { if ( gatewayRequest .getMessageRequest() .getMessageType() == MessageType.VOICE ) { return voiceGatewayManager.sendMessage(gatewayRequest); } if ( ga... |
@Ignore @Test public void testSendMessage() { System.out.println("sendMessage"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000");... | public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { String gatewayResponse; if(messageDetails == null) return null; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error c... | ORServeGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { String gatewayResponse; if(messageDetails == null) return null; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } cat... | ORServeGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { String gatewayResponse; if(messageDetails == null) return null; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } cat... | ORServeGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { String gatewayResponse; if(messageDetails == null) return null; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } cat... | ORServeGatewayManagerImpl implements GatewayManager { public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails) { String gatewayResponse; if(messageDetails == null) return null; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } cat... |
@Ignore @Test public void testGetMessageStatus() { System.out.println("getMessageStatus"); GatewayResponseImpl response = new GatewayResponseImpl(); response.setGatewayMessageId("testId"); String result = instance.getMessageStatus(response); System.out.println("Gateway Response: " + result); assertNotNull(result); } | public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error creating web service client", e); gatewayResponse = e.g... | ORServeGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error c... | ORServeGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error c... | ORServeGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error c... | ORServeGatewayManagerImpl implements GatewayManager { public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.debug("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http: } catch ( MalformedURLException e ) { logger.error("Error c... |
@Ignore @Test public void testMapMessageStatus() { System.out.println("mapMessageStatus"); GatewayResponseImpl response = new GatewayResponseImpl(); response.setResponseText("Some gateway response message"); expect( mockHandler.parseMessageStatus((String) anyObject()) ).andReturn(MStatus.DELIVERED); replay(mockHandler)... | public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } | ORServeGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } } | ORServeGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } } | ORServeGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); String getMessageStatus(GatewayResponse response); MStatus mapMessag... | ORServeGatewayManagerImpl implements GatewayManager { public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } Set<GatewayResponse> sendMessage(GatewayRequest messageDetails); String getMessageStatus(GatewayResponse response); MStatus mapMessag... |
@Test public void testParseMessageResponse() { System.out.println("parseMessageResponse"); GatewayRequest message = null; String gatewayResponse = ""; GatewayRequest expResult = null; Set<GatewayResponse> result = messageHandler.parseMessageResponse(message, gatewayResponse); assertEquals(expResult, result); } | public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responses = new HashSet<GatewayResponse>();... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return nu... |
@Test public void testParseMessageStatus() { System.out.println("parseMessageStatus"); String messageStatus = " "; MStatus expResult = MStatus.PENDING; MStatus result = messageHandler.parseMessageStatus(messageStatus); assertEquals(expResult, result); } | public MStatus parseMessageStatus(String gatewayResponse) { logger.debug("Parsing message gateway status response"); String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ status = ""; } return lookupStatus(status); } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { logger.debug("Parsing message gateway status response"); String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ s... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { logger.debug("Parsing message gateway status response"); String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ s... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { logger.debug("Parsing message gateway status response"); String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ s... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus parseMessageStatus(String gatewayResponse) { logger.debug("Parsing message gateway status response"); String status; String[] responseParts = gatewayResponse.split(" "); if(responseParts.length == 4){ status = responseParts[3]; } else{ s... |
@Test public void testLookupStatus() { System.out.println("lookupStatus"); String messageStatus = " "; MStatus expResult = MStatus.PENDING; MStatus result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "004"; expResult = MStatus.DELIVERED; result = messageHandler.lookupSt... | public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } Set<GatewayR... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; } Set<GatewayR... |
@Test public void testLookupResponse() { System.out.println("lookupResponse"); String messageStatus = " "; MStatus expResult = MStatus.SCHEDULED; MStatus result = messageHandler.lookupResponse(messageStatus); assertEquals(expResult, result); messageStatus = "103"; expResult = MStatus.RETRY; result = messageHandler.look... | public MStatus lookupResponse(String code){ if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code){ if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code){ if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } } | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code){ if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } Set<... | ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupResponse(String code){ if(code.isEmpty()){ return MStatus.SCHEDULED; } for(Entry<MStatus, String> entry: codeResponseMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.SCHEDULED; } Set<... |
@Test public void testDuplicateMessageDisallowed() { IncomingMessage existingMsg = new IncomingMessageImpl(); IncomingMessageForm existingForm = new IncomingMessageFormImpl(); IncomingMessageFormDefinition existingDef = new IncomingMessageFormDefinitionImpl(); existingDef.setDuplicatable(Duplicatable.DISALLOWED); exist... | @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = coreManager .createIncomingMessageDAO(); Calendar ca... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... |
@Test public void testSaveMessage() { System.out.println("saveMessage"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000"); message... | public void saveMessage(GatewayRequest gatewayRequest) { logger.debug("Initializing DAO"); GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); logger.debug("Caching message"); logger.debug(gatewayRequest); gatewayRequestDAO.save(gatewayRequest); } | SMSCacheServiceImpl implements CacheService { public void saveMessage(GatewayRequest gatewayRequest) { logger.debug("Initializing DAO"); GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); logger.debug("Caching message"); logger.debug(gatewayRequest); gatewayRequestDAO.save(gatewayRequest); } } | SMSCacheServiceImpl implements CacheService { public void saveMessage(GatewayRequest gatewayRequest) { logger.debug("Initializing DAO"); GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); logger.debug("Caching message"); logger.debug(gatewayRequest); gatewayRequestDAO.save(gatewayRequest); } ... | SMSCacheServiceImpl implements CacheService { public void saveMessage(GatewayRequest gatewayRequest) { logger.debug("Initializing DAO"); GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); logger.debug("Caching message"); logger.debug(gatewayRequest); gatewayRequestDAO.save(gatewayRequest); } ... | SMSCacheServiceImpl implements CacheService { public void saveMessage(GatewayRequest gatewayRequest) { logger.debug("Initializing DAO"); GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); logger.debug("Caching message"); logger.debug(gatewayRequest); gatewayRequestDAO.save(gatewayRequest); } ... |
@Test public void testSaveResponse() { System.out.println("saveResponse"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.PENDING); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response me... | public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); } | SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayRes... | SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayRes... | SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayRes... | SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayRes... |
@Test public void testGetMessages() { System.out.println("getMessages"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000"); message... | public List<GatewayRequest> getMessages(GatewayRequest gatewayRequest) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.findByExample(gatewayRequest); } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessages(GatewayRequest gatewayRequest) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.findByExample(gatewayRequest); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessages(GatewayRequest gatewayRequest) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.findByExample(gatewayRequest); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessages(GatewayRequest gatewayRequest) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.findByExample(gatewayRequest); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessag... | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessages(GatewayRequest gatewayRequest) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.findByExample(gatewayRequest); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessag... |
@Test public void testGetResponses() { System.out.println("getResponses"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.PENDING); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response me... | public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(gatewayResponse); } | SMSCacheServiceImpl implements CacheService { public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(gatewayResponse); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(gatewayResponse); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(gatewayResponse); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(Gat... | SMSCacheServiceImpl implements CacheService { public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(gatewayResponse); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(Gat... |
@Test public void testGetMessagesByStatus() { System.out.println("getMessagesByStatus"); mockMessageDAO = createMock(GatewayRequestDAO.class); expect( mockCore.createGatewayRequestDAO() ).andReturn(mockMessageDAO); expect( mockMessageDAO.getByStatus((MStatus) anyObject()) ).andReturn(new ArrayList<GatewayRequest>()); r... | public List<GatewayRequest> getMessagesByStatus(MStatus mStatus) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatus(mStatus); } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatus(MStatus mStatus) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatus(mStatus); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatus(MStatus mStatus) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatus(mStatus); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatus(MStatus mStatus) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatus(mStatus); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(GatewayReques... | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatus(MStatus mStatus) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatus(mStatus); } void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(GatewayReques... |
@Test public void testGetMessagesByStatusAndSchedule() { System.out.println("getMessagesByStatusAndSchedule"); mockMessageDAO = createMock(GatewayRequestDAO.class); expect( mockCore.createGatewayRequestDAO() ).andReturn(mockMessageDAO); expect( mockMessageDAO.getByStatusAndSchedule((MStatus) anyObject(), (Date) anyObje... | public List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatusAndSchedule(mStatus, date); } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatusAndSchedule(mStatus, date); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatusAndSchedule(mStatus, date); } } | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatusAndSchedule(mStatus, date); } void saveMessage(GatewayRequest gatewayRe... | SMSCacheServiceImpl implements CacheService { public List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date) { GatewayRequestDAO gatewayRequestDAO = coreManager.createGatewayRequestDAO(); return gatewayRequestDAO.getByStatusAndSchedule(mStatus, date); } void saveMessage(GatewayRequest gatewayRe... |
@Test public void testScheduleMessage() { System.out.println("scheduleMessage"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000");... | @Transactional public void scheduleMessage(GatewayRequest gatewayRequest) { cache.saveMessage(gatewayRequest.getGatewayRequestDetails()); } | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public void scheduleMessage(GatewayRequest gatewayRequest) { cache.saveMessage(gatewayRequest.getGatewayRequestDetails()); } } | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public void scheduleMessage(GatewayRequest gatewayRequest) { cache.saveMessage(gatewayRequest.getGatewayRequestDetails()); } } | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public void scheduleMessage(GatewayRequest gatewayRequest) { cache.saveMessage(gatewayRequest.getGatewayRequestDetails()); } @Transactional void scheduleMessage(GatewayRequest gatewayRequest); @Transactional void scheduleMessage(GatewayRequestD... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public void scheduleMessage(GatewayRequest gatewayRequest) { cache.saveMessage(gatewayRequest.getGatewayRequestDetails()); } @Transactional void scheduleMessage(GatewayRequest gatewayRequest); @Transactional void scheduleMessage(GatewayRequestD... |
@Test public void testSendScheduledMessages() { System.out.println("sendScheduledMessages"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000... | @Transactional(readOnly = true) public void sendScheduledMessages() { logger.info("Fetching cached GatewayRequests"); List<GatewayRequest> scheduledMessages = cache.getMessagesByStatusAndSchedule(MStatus.SCHEDULED, new Date()); if (scheduledMessages != null && scheduledMessages.size() > 0) { logger.info("Sending messag... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void sendScheduledMessages() { logger.info("Fetching cached GatewayRequests"); List<GatewayRequest> scheduledMessages = cache.getMessagesByStatusAndSchedule(MStatus.SCHEDULED, new Date()); if (scheduledMessages != null &&... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void sendScheduledMessages() { logger.info("Fetching cached GatewayRequests"); List<GatewayRequest> scheduledMessages = cache.getMessagesByStatusAndSchedule(MStatus.SCHEDULED, new Date()); if (scheduledMessages != null &&... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void sendScheduledMessages() { logger.info("Fetching cached GatewayRequests"); List<GatewayRequest> scheduledMessages = cache.getMessagesByStatusAndSchedule(MStatus.SCHEDULED, new Date()); if (scheduledMessages != null &&... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void sendScheduledMessages() { logger.info("Fetching cached GatewayRequests"); List<GatewayRequest> scheduledMessages = cache.getMessagesByStatusAndSchedule(MStatus.SCHEDULED, new Date()); if (scheduledMessages != null &&... |
@Test public void testSendMessage() { System.out.println("sendMessage"); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000"); message... | @Transactional public Map<Boolean, Set<GatewayResponse>> sendMessage(GatewayRequest gatewayRequest) { logger.debug("Sending message to gateway"); Set<GatewayResponse> responseList = null; Map<Boolean, Set<GatewayResponse>> result = new HashMap<Boolean, Set<GatewayResponse>>(); try { if ((gatewayRequest.getRecipientsNum... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public Map<Boolean, Set<GatewayResponse>> sendMessage(GatewayRequest gatewayRequest) { logger.debug("Sending message to gateway"); Set<GatewayResponse> responseList = null; Map<Boolean, Set<GatewayResponse>> result = new HashMap<Boolean, Set<Gat... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public Map<Boolean, Set<GatewayResponse>> sendMessage(GatewayRequest gatewayRequest) { logger.debug("Sending message to gateway"); Set<GatewayResponse> responseList = null; Map<Boolean, Set<GatewayResponse>> result = new HashMap<Boolean, Set<Gat... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public Map<Boolean, Set<GatewayResponse>> sendMessage(GatewayRequest gatewayRequest) { logger.debug("Sending message to gateway"); Set<GatewayResponse> responseList = null; Map<Boolean, Set<GatewayResponse>> result = new HashMap<Boolean, Set<Gat... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional public Map<Boolean, Set<GatewayResponse>> sendMessage(GatewayRequest gatewayRequest) { logger.debug("Sending message to gateway"); Set<GatewayResponse> responseList = null; Map<Boolean, Set<GatewayResponse>> result = new HashMap<Boolean, Set<Gat... |
@Test public void testUpdateMessageStatuses() { System.out.println("updateMessageStatuses"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.PENDING); response.setRecipientNumber("000000000000"); response.setResponseText("Some g... | @Transactional(readOnly = true) public void updateMessageStatuses() { logger.info("Updating GatewayResponse objects"); GatewayResponse gwResp = coreManager.createGatewayResponse(); gwResp.setMessageStatus(MStatus.PENDING); List<GatewayResponse> pendingMessages = cache.getResponses(gwResp); for (GatewayResponse response... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void updateMessageStatuses() { logger.info("Updating GatewayResponse objects"); GatewayResponse gwResp = coreManager.createGatewayResponse(); gwResp.setMessageStatus(MStatus.PENDING); List<GatewayResponse> pendingMessages... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void updateMessageStatuses() { logger.info("Updating GatewayResponse objects"); GatewayResponse gwResp = coreManager.createGatewayResponse(); gwResp.setMessageStatus(MStatus.PENDING); List<GatewayResponse> pendingMessages... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void updateMessageStatuses() { logger.info("Updating GatewayResponse objects"); GatewayResponse gwResp = coreManager.createGatewayResponse(); gwResp.setMessageStatus(MStatus.PENDING); List<GatewayResponse> pendingMessages... | SMSMessagingServiceImpl implements MobileMessagingService { @Transactional(readOnly = true) public void updateMessageStatuses() { logger.info("Updating GatewayResponse objects"); GatewayResponse gwResp = coreManager.createGatewayResponse(); gwResp.setMessageStatus(MStatus.PENDING); List<GatewayResponse> pendingMessages... |
@Test public void testDuplicateInProcess() { IncomingMessage existingMsg = new IncomingMessageImpl(); existingMsg.setMessageStatus(IncMessageStatus.PROCESSING); existingMsg.setContent(message); expect(mockCoreMgr.createIncomingMessageDAO()).andReturn(mockMsgDao); expect(mockMsgDao.getByContentNonDuplicatable(message)).... | @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = coreManager .createIncomingMessageDAO(); Calendar ca... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... |
@Test public void testGetMessageStatus() { System.out.println("getMessageStatus"); String expResult = "delivered"; expect( mockGateway.getMessageStatus((GatewayResponse) anyObject()) ).andReturn("delivered"); replay(mockGateway); String result = instance.getMessageStatus(new GatewayResponseImpl()); assertEquals(expResu... | String getMessageStatus(GatewayResponse response) { logger.info("Calling GatewayManager.getMessageStatus"); return gatewayManager.getMessageStatus(response); } | SMSMessagingServiceImpl implements MobileMessagingService { String getMessageStatus(GatewayResponse response) { logger.info("Calling GatewayManager.getMessageStatus"); return gatewayManager.getMessageStatus(response); } } | SMSMessagingServiceImpl implements MobileMessagingService { String getMessageStatus(GatewayResponse response) { logger.info("Calling GatewayManager.getMessageStatus"); return gatewayManager.getMessageStatus(response); } } | SMSMessagingServiceImpl implements MobileMessagingService { String getMessageStatus(GatewayResponse response) { logger.info("Calling GatewayManager.getMessageStatus"); return gatewayManager.getMessageStatus(response); } @Transactional void scheduleMessage(GatewayRequest gatewayRequest); @Transactional void scheduleMes... | SMSMessagingServiceImpl implements MobileMessagingService { String getMessageStatus(GatewayResponse response) { logger.info("Calling GatewayManager.getMessageStatus"); return gatewayManager.getMessageStatus(response); } @Transactional void scheduleMessage(GatewayRequest gatewayRequest); @Transactional void scheduleMes... |
@Test public void testRejectDuplicateMessageTimeBound() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -3); Date existingCreated = cal.getTime(); IncomingMessage existingMsg = new IncomingMessageImpl(); IncomingMessageForm existingForm = new IncomingMessageFormImpl(); IncomingMessageFormDefinition ex... | @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = coreManager .createIncomingMessageDAO(); Calendar ca... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... |
@Test public void testAcceptDuplicateMessageTimeBound() throws DuplicateMessageException { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -10); Date existingCreated = cal.getTime(); IncomingMessage existingMsg = new IncomingMessageImpl(); IncomingMessageForm existingForm = new IncomingMessageFormImpl()... | @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = coreManager .createIncomingMessageDAO(); Calendar ca... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... | MessageRegistryImpl implements MessageRegistry { @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = DuplicateMessageException.class) public IncomingMessage registerMessage(String message) throws DuplicateMessageException { IncomingMessageDAO<IncomingMessage> msgDao = cor... |
@SuppressWarnings("unchecked") @Test public void testProcessRequest() throws DuplicateMessageException { System.out.println("processRequest"); String message = "Type=EditPatient\nCHPSID=123\nPatientRegNum=123"; String requesterPhone = "000000000000"; String expResult = "Form entry cancelled"; Map<String, CommandAction>... | @SuppressWarnings("unchecked") public IncomingMessageResponse processRequest(String message, String requesterPhone, boolean isDemo) { IncomingMessageDAO<IncomingMessage> msgDao = coreManager.createIncomingMessageDAO(); IncomingMessageResponse response = coreManager.createIncomingMessageResponse(); IncomingMessage inMsg... | IMPServiceImpl implements IMPService { @SuppressWarnings("unchecked") public IncomingMessageResponse processRequest(String message, String requesterPhone, boolean isDemo) { IncomingMessageDAO<IncomingMessage> msgDao = coreManager.createIncomingMessageDAO(); IncomingMessageResponse response = coreManager.createIncomingM... | IMPServiceImpl implements IMPService { @SuppressWarnings("unchecked") public IncomingMessageResponse processRequest(String message, String requesterPhone, boolean isDemo) { IncomingMessageDAO<IncomingMessage> msgDao = coreManager.createIncomingMessageDAO(); IncomingMessageResponse response = coreManager.createIncomingM... | IMPServiceImpl implements IMPService { @SuppressWarnings("unchecked") public IncomingMessageResponse processRequest(String message, String requesterPhone, boolean isDemo) { IncomingMessageDAO<IncomingMessage> msgDao = coreManager.createIncomingMessageDAO(); IncomingMessageResponse response = coreManager.createIncomingM... | IMPServiceImpl implements IMPService { @SuppressWarnings("unchecked") public IncomingMessageResponse processRequest(String message, String requesterPhone, boolean isDemo) { IncomingMessageDAO<IncomingMessage> msgDao = coreManager.createIncomingMessageDAO(); IncomingMessageResponse response = coreManager.createIncomingM... |
@Test public void testFormatPhoneNumber(){ String number = "0244000000"; String expResult = "233244000000"; instance.setDefaultCountryCode("233"); instance.setLocalNumberExpression("0[0-9]{9}"); String result = instance.formatPhoneNumber(number); assertEquals(result, expResult); number = "1234567890"; result = instance... | public String formatPhoneNumber( String requesterPhone) { if (requesterPhone == null || requesterPhone.isEmpty()) { return null; } String formattedNumber = requesterPhone; if (Pattern.matches(localNumberExpression, requesterPhone)) { formattedNumber = defaultCountryCode + requesterPhone.substring(1); } return formatted... | IMPServiceImpl implements IMPService { public String formatPhoneNumber( String requesterPhone) { if (requesterPhone == null || requesterPhone.isEmpty()) { return null; } String formattedNumber = requesterPhone; if (Pattern.matches(localNumberExpression, requesterPhone)) { formattedNumber = defaultCountryCode + requeste... | IMPServiceImpl implements IMPService { public String formatPhoneNumber( String requesterPhone) { if (requesterPhone == null || requesterPhone.isEmpty()) { return null; } String formattedNumber = requesterPhone; if (Pattern.matches(localNumberExpression, requesterPhone)) { formattedNumber = defaultCountryCode + requeste... | IMPServiceImpl implements IMPService { public String formatPhoneNumber( String requesterPhone) { if (requesterPhone == null || requesterPhone.isEmpty()) { return null; } String formattedNumber = requesterPhone; if (Pattern.matches(localNumberExpression, requesterPhone)) { formattedNumber = defaultCountryCode + requeste... | IMPServiceImpl implements IMPService { public String formatPhoneNumber( String requesterPhone) { if (requesterPhone == null || requesterPhone.isEmpty()) { return null; } String formattedNumber = requesterPhone; if (Pattern.matches(localNumberExpression, requesterPhone)) { formattedNumber = defaultCountryCode + requeste... |
@Ignore @Test public void testValidate() { System.out.println("validate"); } | public boolean validate(IncomingMessageFormParameter param) { if (!param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.NEW)) { return param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.VALID); } String paramRegex = getParamTypeMap().get(param.getIncomingMsgFormParamDefinition().ge... | IncomingMessageFormParameterValidatorImpl implements IncomingMessageFormParameterValidator { public boolean validate(IncomingMessageFormParameter param) { if (!param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.NEW)) { return param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.VAL... | IncomingMessageFormParameterValidatorImpl implements IncomingMessageFormParameterValidator { public boolean validate(IncomingMessageFormParameter param) { if (!param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.NEW)) { return param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.VAL... | IncomingMessageFormParameterValidatorImpl implements IncomingMessageFormParameterValidator { public boolean validate(IncomingMessageFormParameter param) { if (!param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.NEW)) { return param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.VAL... | IncomingMessageFormParameterValidatorImpl implements IncomingMessageFormParameterValidator { public boolean validate(IncomingMessageFormParameter param) { if (!param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.NEW)) { return param.getMessageFormParamStatus().equals(IncMessageFormParameterStatus.VAL... |
@Test public void testGenerateID() { Long result = MotechIDGenerator.generateID(MotechIDGenerator.DEFUALT_ID_LENGTH); System.out.println("ID: " + result); assertNotNull(result); } | public static Long generateID(int length) { logger.info("Calling generateID with specify length"); Long result = null; if (length > 0) { StringBuilder id = new StringBuilder(length); for (int i = 0; i < length; i++) { id.append(NUMS[(int) Math.floor(Math.random() * 20)]); } result = Long.parseLong(id.toString()); } ret... | MotechIDGenerator { public static Long generateID(int length) { logger.info("Calling generateID with specify length"); Long result = null; if (length > 0) { StringBuilder id = new StringBuilder(length); for (int i = 0; i < length; i++) { id.append(NUMS[(int) Math.floor(Math.random() * 20)]); } result = Long.parseLong(i... | MotechIDGenerator { public static Long generateID(int length) { logger.info("Calling generateID with specify length"); Long result = null; if (length > 0) { StringBuilder id = new StringBuilder(length); for (int i = 0; i < length; i++) { id.append(NUMS[(int) Math.floor(Math.random() * 20)]); } result = Long.parseLong(i... | MotechIDGenerator { public static Long generateID(int length) { logger.info("Calling generateID with specify length"); Long result = null; if (length > 0) { StringBuilder id = new StringBuilder(length); for (int i = 0; i < length; i++) { id.append(NUMS[(int) Math.floor(Math.random() * 20)]); } result = Long.parseLong(i... | MotechIDGenerator { public static Long generateID(int length) { logger.info("Calling generateID with specify length"); Long result = null; if (length > 0) { StringBuilder id = new StringBuilder(length); for (int i = 0; i < length; i++) { id.append(NUMS[(int) Math.floor(Math.random() * 20)]); } result = Long.parseLong(i... |
@Test public void shouldFindMotechId() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("FINDMOTECHID-JF"); expect( mockWebService.queryMotechId((Integer) anyObject(), (Integer) anyObject(), (String) anyObject(), (String) anyObject(), (S... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldViewPatientDetails() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("VIEWPATIENT-JF"); expect( mockWebService.queryPatient((Integer) anyObject(), (Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldUpcomingCare() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("UPCOMINGCARE-JF"); expect( mockWebService.queryUpcomingCare((Integer) anyObject(), (Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldOverDueDeliveries() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("OVERDUEDELIVERIES-JF"); expect( mockWebService.queryOverdueDeliveries((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); replay(m... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessRecentDeliveries() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("RECENTDELIVERIES-JF"); expect( mockWebService.queryRecentDeliveries((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); repl... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessUpcomingDeliveries() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("UPCOMINGDELIVERIES-JF"); expect( mockWebService.queryUpcomingDeliveries((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null)... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessCWCDefaulters() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("CWCDEFAULT-JF"); expect( mockWebService.queryCWCDefaulters((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); replay(mockWebSe... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessChildPNCDefaulters() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("PNCDEFAULT-JF"); expect( mockWebService.queryChildPNCDefaulters((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); replay... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessMotherPNCDefaulters() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("PPCDEFAULT-JF"); expect( mockWebService.queryMotherPNCDefaulters((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); repl... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessTTDefaulters() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("TTDEFAULT-JF"); expect( mockWebService.queryTTDefaulters((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); replay(mockWebServi... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void testGetMostRecentResponseByRequestId() { System.out.println("getMostRecentResponseByRequestId"); GatewayResponse result = rDDAO.getMostRecentResponseByMessageId(grq1.getMessageRequest().getId()); System.out.println(result.getId()); Assert.assertNotNull(result); Assert.assertEquals(gr7, result); Assert... | public GatewayResponse getMostRecentResponseByMessageId(Long messageId) { logger.debug("variable passed to getMostRecentResponseByRequestId: " + messageId); try { GatewayResponse response = null; String query = "from GatewayResponseImpl g where g.gatewayRequest.messageRequest.id = :reqId and g.gatewayRequest.messageSta... | GatewayResponseDAOImpl extends HibernateGenericDAOImpl<GatewayResponseImpl> implements GatewayResponseDAO<GatewayResponseImpl> { public GatewayResponse getMostRecentResponseByMessageId(Long messageId) { logger.debug("variable passed to getMostRecentResponseByRequestId: " + messageId); try { GatewayResponse response = n... | GatewayResponseDAOImpl extends HibernateGenericDAOImpl<GatewayResponseImpl> implements GatewayResponseDAO<GatewayResponseImpl> { public GatewayResponse getMostRecentResponseByMessageId(Long messageId) { logger.debug("variable passed to getMostRecentResponseByRequestId: " + messageId); try { GatewayResponse response = n... | GatewayResponseDAOImpl extends HibernateGenericDAOImpl<GatewayResponseImpl> implements GatewayResponseDAO<GatewayResponseImpl> { public GatewayResponse getMostRecentResponseByMessageId(Long messageId) { logger.debug("variable passed to getMostRecentResponseByRequestId: " + messageId); try { GatewayResponse response = n... | GatewayResponseDAOImpl extends HibernateGenericDAOImpl<GatewayResponseImpl> implements GatewayResponseDAO<GatewayResponseImpl> { public GatewayResponse getMostRecentResponseByMessageId(Long messageId) { logger.debug("variable passed to getMostRecentResponseByRequestId: " + messageId); try { GatewayResponse response = n... |
@Test public void shouldProcessANCDefaulters() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("ANCDEFAULT-JF"); expect( mockWebService.queryANCDefaulters((Integer) anyObject(), (Integer) anyObject()) ).andReturn(null); replay(mockWebSe... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessMotherOPD() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("MOTHEROPD-JF"); mockWebService.recordMotherVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (String) anyObject(), (Intege... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessChildOPD() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("CHILDOPD-JF"); mockWebService.recordChildVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (String) anyObject(), (Integer) ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessReisterCWCChild() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERCWCCHILD-JF"); mockWebService.registerCWCChild((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObje... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessReisterCWCChildLanguage() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERCWCCHILD-JF"); IncomingMessageFormParameterImpl languageParam = new IncomingMessageFormParameterImpl(); String comment = "... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessRegisterANCMother() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERANCMOTHER-JF"); mockWebService.registerANCMother((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) any... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessRegisterANCMotherLanguage() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERANCMOTHER-JF"); IncomingMessageFormParameterImpl languageParam = new IncomingMessageFormParameterImpl(); String comment ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessRegisterPregnancy() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERPREGNANCY-JF"); mockWebService.registerPregnancy((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) any... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessRegisterPatient() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("REGISTERPATIENT-JF"); expect( mockWebService.registerPatient((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Registrati... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessChildPNC() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("CHILDPNC-JF"); mockWebService.recordChildPNCVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(), (Integ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Ignore @Test public void testGetByStatusAndSchedule() { System.out.println("getByStatusAndSchedule"); List<GatewayRequest> expResult = new ArrayList<GatewayRequest>(); md4.setGatewayRequestDetails(grd4); md5.setGatewayRequestDetails(grd5); expResult.add(md4); expResult.add(md5); MStatus status = MStatus.FAILED; List r... | public List<GatewayRequest> getByStatusAndSchedule(MStatus status, Date schedule) { logger.debug("variables passed to getByStatusAndSchedule. status: " + status + "And schedule: " + schedule); try { List<GatewayRequest> allbystatandSdule; Criteria criteria = this.getSessionFactory().getCurrentSession().createCriteria(g... | GatewayRequestDAOImpl extends HibernateGenericDAOImpl<GatewayRequestImpl> implements GatewayRequestDAO<GatewayRequestImpl> { public List<GatewayRequest> getByStatusAndSchedule(MStatus status, Date schedule) { logger.debug("variables passed to getByStatusAndSchedule. status: " + status + "And schedule: " + schedule); tr... | GatewayRequestDAOImpl extends HibernateGenericDAOImpl<GatewayRequestImpl> implements GatewayRequestDAO<GatewayRequestImpl> { public List<GatewayRequest> getByStatusAndSchedule(MStatus status, Date schedule) { logger.debug("variables passed to getByStatusAndSchedule. status: " + status + "And schedule: " + schedule); tr... | GatewayRequestDAOImpl extends HibernateGenericDAOImpl<GatewayRequestImpl> implements GatewayRequestDAO<GatewayRequestImpl> { public List<GatewayRequest> getByStatusAndSchedule(MStatus status, Date schedule) { logger.debug("variables passed to getByStatusAndSchedule. status: " + status + "And schedule: " + schedule); tr... | GatewayRequestDAOImpl extends HibernateGenericDAOImpl<GatewayRequestImpl> implements GatewayRequestDAO<GatewayRequestImpl> { public List<GatewayRequest> getByStatusAndSchedule(MStatus status, Date schedule) { logger.debug("variables passed to getByStatusAndSchedule. status: " + status + "And schedule: " + schedule); tr... |
@Test public void shouldProcessTT() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("TT-JF"); mockWebService.recordTTVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(), (Integer) anyObject()); ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessDeath() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("DEATH-JF"); mockWebService.recordDeath((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject()); expectLastCall(); r... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessMotherPNC() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("MOTHERPNC-JF"); mockWebService.recordMotherPNCVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(), (In... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessDeliveryNotification() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("DELIVERYNOTIFY-JF"); mockWebService.recordDeliveryNotification((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Int... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessDelivery() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("DELIVERY-JF"); expect( mockWebService.recordPregnancyDelivery((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObje... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessPregnancyTermination() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("ABORTION-JF"); mockWebService.recordPregnancyTermination((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) ... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessChildCWCVisit() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("ChildCWC-jf"); mockWebService.recordChildCWCVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(),(S... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessMotherANCVisit() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("ANC-JF"); mockWebService.recordMotherANCVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(),(Stri... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shouldProcessEditPatient() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("EDITPATIENT-JF"); mockWebService.editPatient((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (Integer) anyObject(), (Integer... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void shuouldProcessGeneralVisit() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("GENERALOPD-JF"); mockWebService.recordGeneralVisit((Integer) anyObject(), (Integer) anyObject(), (Date) anyObject(), (String) anyObject(), (... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void testGeByCode() { System.out.print("test getIdByCode"); Language expResult = l2; Language Result = lDao.getByCode(code); Assert.assertNotNull(Result); Assert.assertEquals(expResult, Result); } | public Language getByCode(String code) { logger.debug("variable passed to getByCode: " + code); try { Language lang = (Language) this.getSessionFactory().getCurrentSession().createCriteria(LanguageImpl.class).add(Restrictions.eq("code", code)).uniqueResult(); logger.debug(lang); return lang; } catch (NonUniqueResultExc... | LanguageDAOImpl extends HibernateGenericDAOImpl<LanguageImpl> implements LanguageDAO<LanguageImpl> { public Language getByCode(String code) { logger.debug("variable passed to getByCode: " + code); try { Language lang = (Language) this.getSessionFactory().getCurrentSession().createCriteria(LanguageImpl.class).add(Restri... | LanguageDAOImpl extends HibernateGenericDAOImpl<LanguageImpl> implements LanguageDAO<LanguageImpl> { public Language getByCode(String code) { logger.debug("variable passed to getByCode: " + code); try { Language lang = (Language) this.getSessionFactory().getCurrentSession().createCriteria(LanguageImpl.class).add(Restri... | LanguageDAOImpl extends HibernateGenericDAOImpl<LanguageImpl> implements LanguageDAO<LanguageImpl> { public Language getByCode(String code) { logger.debug("variable passed to getByCode: " + code); try { Language lang = (Language) this.getSessionFactory().getCurrentSession().createCriteria(LanguageImpl.class).add(Restri... | LanguageDAOImpl extends HibernateGenericDAOImpl<LanguageImpl> implements LanguageDAO<LanguageImpl> { public Language getByCode(String code) { logger.debug("variable passed to getByCode: " + code); try { Language lang = (Language) this.getSessionFactory().getCurrentSession().createCriteria(LanguageImpl.class).add(Restri... |
@Test public void shouldRegisterGeneralOutpatientVisitsWithComments() throws ValidationException { form.setMessageFormStatus(IncMessageFormStatus.VALID); form.getIncomingMsgFormDefinition().setFormCode("GENERALOPD-JF"); IncomingMessageFormParameterImpl commentsParam = new IncomingMessageFormParameterImpl(); String comm... | public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLenient(true); if (getServiceMethods().contains... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... | FormProcessorImpl implements FormProcessor { public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature methodSignature; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateFormat(defaultDateFormat); dFormat.setLe... |
@Test public void testParseValidationErrors() { } | public void parseValidationErrors(IncomingMessageForm form, ValidationException ex) { List<String> errors = ex.getFaultInfo().getErrors(); form.setErrors(errors); } | FormProcessorImpl implements FormProcessor { public void parseValidationErrors(IncomingMessageForm form, ValidationException ex) { List<String> errors = ex.getFaultInfo().getErrors(); form.setErrors(errors); } } | FormProcessorImpl implements FormProcessor { public void parseValidationErrors(IncomingMessageForm form, ValidationException ex) { List<String> errors = ex.getFaultInfo().getErrors(); form.setErrors(errors); } } | FormProcessorImpl implements FormProcessor { public void parseValidationErrors(IncomingMessageForm form, ValidationException ex) { List<String> errors = ex.getFaultInfo().getErrors(); form.setErrors(errors); } String processForm(IncomingMessageForm form); void parseValidationErrors(IncomingMessageForm form, Validation... | FormProcessorImpl implements FormProcessor { public void parseValidationErrors(IncomingMessageForm form, ValidationException ex) { List<String> errors = ex.getFaultInfo().getErrors(); form.setErrors(errors); } String processForm(IncomingMessageForm form); void parseValidationErrors(IncomingMessageForm form, Validation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.