use of org.finra.herd.model.api.xml.DataProviderKeys in project herd by FINRAOS.
the class DataProviderServiceImpl method getDataProviders.
@Override
public DataProviderKeys getDataProviders() {
DataProviderKeys dataProviderKeys = new DataProviderKeys();
dataProviderKeys.getDataProviderKeys().addAll(dataProviderDao.getDataProviders());
return dataProviderKeys;
}
use of org.finra.herd.model.api.xml.DataProviderKeys in project herd by FINRAOS.
the class DataProviderRestControllerTest method testGetDataProviders.
@Test
public void testGetDataProviders() throws Exception {
DataProviderKeys dataProviderKeys = new DataProviderKeys(Arrays.asList(new DataProviderKey(DATA_PROVIDER_NAME), new DataProviderKey(DATA_PROVIDER_NAME_2)));
when(dataProviderService.getDataProviders()).thenReturn(dataProviderKeys);
// Retrieve a list of data provider keys.
DataProviderKeys resultDataProviderKeys = dataProviderRestController.getDataProviders();
// Verify the external calls.
verify(dataProviderService).getDataProviders();
verifyNoMoreInteractions(dataProviderService);
// Validate the returned object.
assertEquals(dataProviderKeys, resultDataProviderKeys);
}
use of org.finra.herd.model.api.xml.DataProviderKeys in project herd by FINRAOS.
the class DataProviderServiceTest method testGetDataProviders.
@Test
public void testGetDataProviders() throws Exception {
// Create and persist data provider entities.
for (DataProviderKey key : DATA_PROVIDER_KEYS) {
dataProviderDaoTestHelper.createDataProviderEntity(key.getDataProviderName());
}
// Retrieve a list of data provider keys.
DataProviderKeys resultDataProviderKeys = dataProviderService.getDataProviders();
// Validate the returned object.
assertEquals(DATA_PROVIDER_KEYS, resultDataProviderKeys.getDataProviderKeys());
}
Aggregations