mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Refactored IntegrationService
This commit is contained in:
@@ -9,6 +9,8 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service-stub';
|
||||
import { IntegrationService } from './integration.service';
|
||||
import { IntegrationSearchOptions } from './models/integration-options.model';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/mock-remote-data-build.service';
|
||||
|
||||
const LINK_NAME = 'authorities';
|
||||
const BROWSE = 'entries';
|
||||
@@ -20,6 +22,7 @@ class TestService extends IntegrationService {
|
||||
constructor(
|
||||
protected responseCache: ResponseCacheService,
|
||||
protected requestService: RequestService,
|
||||
protected rdbService: RemoteDataBuildService,
|
||||
protected halService: HALEndpointService) {
|
||||
super();
|
||||
}
|
||||
@@ -30,6 +33,7 @@ describe('IntegrationService', () => {
|
||||
let service: TestService;
|
||||
let responseCache: ResponseCacheService;
|
||||
let requestService: RequestService;
|
||||
let rdbService: RemoteDataBuildService;
|
||||
let halService: any;
|
||||
let findOptions: IntegrationSearchOptions;
|
||||
|
||||
@@ -55,6 +59,7 @@ describe('IntegrationService', () => {
|
||||
return new TestService(
|
||||
responseCache,
|
||||
requestService,
|
||||
rdbService,
|
||||
halService
|
||||
);
|
||||
}
|
||||
@@ -62,6 +67,7 @@ describe('IntegrationService', () => {
|
||||
beforeEach(() => {
|
||||
responseCache = initMockResponseCacheService(true);
|
||||
requestService = getMockRequestService();
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HALEndpointServiceStub(integrationEndpoint);
|
||||
findOptions = new IntegrationSearchOptions(uuid, name, metadata, query);
|
||||
|
Reference in New Issue
Block a user