use of com.hack23.cia.service.component.agent.impl.common.jms.JmsSender in project cia by Hack23.
the class RiksdagenPersonsWorkGeneratorImplITest method generateWorkOrdersSuccessTest.
/**
* Generate work orders success test.
* @throws JMSException
*/
@Test
public void generateWorkOrdersSuccessTest() throws JMSException {
riksdagenDataSourcesWorkGenerator.generateWorkOrders();
final JmsSender jmsSenderMock = mock(JmsSender.class);
ReflectionTestUtils.setField(riksdagenDataSourcesWorkGenerator, "jmsSender", jmsSenderMock);
riksdagenDataSourcesWorkGenerator.generateWorkOrders();
final ArgumentCaptor<Destination> destCaptor = ArgumentCaptor.forClass(Destination.class);
final ArgumentCaptor<Serializable> stringCaptor = ArgumentCaptor.forClass(Serializable.class);
verify(jmsSenderMock, atLeastOnce()).send(destCaptor.capture(), stringCaptor.capture());
final List<Serializable> capturedStrings = stringCaptor.getAllValues();
final List<Destination> capturedDestinations = destCaptor.getAllValues();
assertNotNull(capturedStrings);
assertNotNull(capturedDestinations);
}
use of com.hack23.cia.service.component.agent.impl.common.jms.JmsSender in project cia by Hack23.
the class WorldBankDataWorkGeneratorImplITest method generateWorkOrdersSuccessTest.
/**
* Generate work orders success test.
* @throws JMSException
*/
@Test
public void generateWorkOrdersSuccessTest() throws JMSException {
final JmsSender jmsSenderMock = mock(JmsSender.class);
ReflectionTestUtils.setField(worldBankDataSourcesWorkGenerator, "jmsSender", jmsSenderMock);
worldBankDataSourcesWorkGenerator.generateWorkOrders();
final ArgumentCaptor<Destination> destCaptor = ArgumentCaptor.forClass(Destination.class);
final ArgumentCaptor<Serializable> stringCaptor = ArgumentCaptor.forClass(Serializable.class);
verify(jmsSenderMock, atLeastOnce()).send(destCaptor.capture(), stringCaptor.capture());
final List<Serializable> capturedStrings = stringCaptor.getAllValues();
final List<Destination> capturedDestinations = destCaptor.getAllValues();
assertNotNull(capturedStrings);
assertNotNull(capturedDestinations);
}
use of com.hack23.cia.service.component.agent.impl.common.jms.JmsSender in project cia by Hack23.
the class WorldBankIndicatorWorkGeneratorImplITest method generateWorkOrdersSuccessTest.
/**
* Generate work orders success test.
* @throws JMSException
*/
@Test
public void generateWorkOrdersSuccessTest() throws JMSException {
final JmsSender jmsSenderMock = mock(JmsSender.class);
ReflectionTestUtils.setField(worldBankDataSourcesWorkGenerator, "jmsSender", jmsSenderMock);
worldBankDataSourcesWorkGenerator.generateWorkOrders();
final ArgumentCaptor<Destination> destCaptor = ArgumentCaptor.forClass(Destination.class);
final ArgumentCaptor<Serializable> stringCaptor = ArgumentCaptor.forClass(Serializable.class);
verify(jmsSenderMock, atLeastOnce()).send(destCaptor.capture(), stringCaptor.capture());
final List<Serializable> capturedStrings = stringCaptor.getAllValues();
final List<Destination> capturedDestinations = destCaptor.getAllValues();
assertNotNull(capturedStrings);
assertNotNull(capturedDestinations);
}
Aggregations