use of org.eclipse.dataspaceconnector.dataloading.AssetLoader in project DataSpaceConnector by eclipse-dataspaceconnector.
the class HttpProvisionerExtensionEndToEndTest method setup.
@BeforeEach
void setup(EdcExtension extension) {
extension.setConfiguration(Map.of("web.http.data.port", String.valueOf(dataPort), "web.http.data.path", "/api/v1/data"));
delegate = mock(Interceptor.class);
var httpClient = testOkHttpClient().newBuilder().addInterceptor(delegate).build();
extension.registerServiceMock(TransferWaitStrategy.class, () -> 1);
extension.registerSystemExtension(ServiceExtension.class, new HttpProvisionerExtension(httpClient));
extension.registerSystemExtension(ServiceExtension.class, new DummyCallbackUrlExtension());
extension.setConfiguration(PROVISIONER_CONFIG);
extension.registerSystemExtension(ServiceExtension.class, new ServiceExtension() {
@Inject
private AssetLoader // needed for on-demand dependency resolution
loader;
});
}
use of org.eclipse.dataspaceconnector.dataloading.AssetLoader in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CloudTransferExtension method registerDataEntries.
private void registerDataEntries(ServiceExtensionContext context) {
AssetLoader assetIndex = context.getService(AssetLoader.class);
DataAddress dataAddress = DataAddress.Builder.newInstance().property("type", "AzureStorage").property("container", "src-container").property("blobname", "test-document.txt").build();
String assetId = "test-document";
Asset asset = Asset.Builder.newInstance().id(assetId).build();
assetIndex.accept(asset, dataAddress);
}
Aggregations