use of org.javamoney.moneta.spi.LoaderService.LoaderListener in project jsr354-ri by JavaMoney.
the class LoadDataInformationBuilderTest method shouldReturnsErrorWhenPropertiesWasNotInformed.
@Test(expectedExceptions = IllegalStateException.class)
public void shouldReturnsErrorWhenPropertiesWasNotInformed() throws URISyntaxException {
String resourceId = "resourceId";
UpdatePolicy updatePolicy = UpdatePolicy.LAZY;
LoaderListener loaderListener = new LoaderListener() {
@Override
public void newDataLoaded(String resourceId, InputStream is) {
}
};
URI[] resourceLocations = new URI[] { new URI("localhost") };
new LoadDataInformationBuilder().withResourceId(resourceId).withUpdatePolicy(updatePolicy).withLoaderListener(loaderListener).withResourceLocations(resourceLocations).build();
}
use of org.javamoney.moneta.spi.LoaderService.LoaderListener in project jsr354-ri by JavaMoney.
the class LoadDataInformationBuilderTest method shouldReturnsErrorWhenUpdatePolicyWasNotInformed.
@Test(expectedExceptions = IllegalStateException.class)
public void shouldReturnsErrorWhenUpdatePolicyWasNotInformed() throws URISyntaxException {
String resourceId = "resourceId";
Map<String, String> properties = new HashMap<>();
LoaderListener loaderListener = new LoaderListener() {
@Override
public void newDataLoaded(String resourceId, InputStream is) {
}
};
URI[] resourceLocations = new URI[] { new URI("localhost") };
new LoadDataInformationBuilder().withResourceId(resourceId).withProperties(properties).withLoaderListener(loaderListener).withResourceLocations(resourceLocations).build();
}
Aggregations