Skip to content

Commit 019ba26

Browse files
committed
[DURACOM-327] Fix internal core import WIP
1 parent 5214e2c commit 019ba26

64 files changed

Lines changed: 633 additions & 627 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/core/src/lib/core/data/access-status-data.service.spec.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import {
55
import { hasNoValue } from '@dspace/shared/utils';
66
import { Observable } from 'rxjs';
77

8-
import { RemoteDataBuildService } from '../cache';
9-
import { ObjectCacheService } from '../cache';
10-
import { getMockRequestService } from '../mocks';
11-
import { Item } from '../shared';
12-
import { createSuccessfulRemoteDataObject$ } from '../utilities';
13-
import { HALEndpointServiceStub } from '../utilities';
14-
import { NotificationsServiceStub } from '../utilities';
15-
import { AccessStatusDataService } from '@dspace/core';
16-
import { RemoteData } from '@dspace/core';
17-
import { GetRequest } from '@dspace/core';
18-
import { RequestService } from '@dspace/core';
8+
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
9+
import { ObjectCacheService } from '../cache/object-cache.service';
10+
import { getMockRequestService } from '../mocks/request.service.mock';
11+
import { Item } from '../shared/item.model';
12+
import { createSuccessfulRemoteDataObject$ } from '../utilities/remote-data.utils';
13+
import { HALEndpointServiceStub } from '../utilities/testing/hal-endpoint-service.stub';
14+
import { NotificationsServiceStub } from '../utilities/testing/notifications-service.stub';
15+
import { AccessStatusDataService } from './access-status-data.service';
16+
import { RemoteData } from './remote-data';
17+
import { GetRequest } from './request.models';
18+
import { RequestService } from './request.service';
1919

2020
const url = 'fake-url';
2121

modules/core/src/lib/core/data/array-move-change-analyzer.service.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { moveItemInArray } from '@angular/cdk/drag-drop';
22
import { Operation } from 'fast-json-patch';
33

4-
import { ArrayMoveChangeAnalyzer } from '@dspace/core';
4+
import { ArrayMoveChangeAnalyzer } from './array-move-change-analyzer.service';
5+
6+
57

68
/**
79
* Helper class for creating move tests

modules/core/src/lib/core/data/base-response-parsing.service.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* eslint-disable max-classes-per-file */
2-
import { CacheableObject } from '../cache';
3-
import { ObjectCacheService } from '../cache';
4-
import { DSpaceObject } from '../shared';
5-
import { BaseResponseParsingService } from '@dspace/core';
6-
import { GetRequest } from '@dspace/core';
7-
import { RestRequest } from '@dspace/core';
2+
import { CacheableObject } from '../cache/cacheable-object.model';
3+
import { ObjectCacheService } from '../cache/object-cache.service';
4+
import { DSpaceObject } from '../shared/dspace-object.model';
5+
import { BaseResponseParsingService } from './base-response-parsing.service';
6+
import { GetRequest } from './request.models';
7+
import { RestRequest } from './rest-request.model';
88

99
class TestService extends BaseResponseParsingService {
1010
toCache = true;

modules/core/src/lib/core/data/base/delete-data.spec.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,31 @@ import {
1111
} from 'rxjs';
1212
import { TestScheduler } from 'rxjs/testing';
1313

14-
import { RemoteDataBuildService } from '../../cache';
15-
import { ObjectCacheService } from '../../cache';
16-
import { getMockRemoteDataBuildService } from '../../mocks';
17-
import { getMockRequestService } from '../../mocks';
18-
import { NotificationsService } from '@dspace/core';
19-
import { HALEndpointService } from '../../shared';
14+
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
15+
import { ObjectCacheService } from '../../cache/object-cache.service';
16+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
17+
import { getMockRequestService } from '../../mocks/request.service.mock';
18+
import { NotificationsService } from '../../notifications/notifications.service';
19+
import { HALEndpointService } from '../../shared/hal-endpoint.service';
2020
import {
2121
createFailedRemoteDataObject,
2222
createSuccessfulRemoteDataObject,
2323
createSuccessfulRemoteDataObject$,
24-
} from '@dspace/core';
25-
import { HALEndpointServiceStub } from '../../utilities';
26-
import { FindListOptions } from '@dspace/core';
27-
import { followLink } from '@dspace/core';
28-
import { RemoteData } from '@dspace/core';
29-
import { RequestService } from '@dspace/core';
30-
import { RequestEntryState } from '@dspace/core';
31-
import { RestRequestMethod } from '@dspace/core';
24+
} from '../../utilities/remote-data.utils';
25+
import { HALEndpointServiceStub } from '../../utilities/testing/hal-endpoint-service.stub';
26+
import { FindListOptions } from '../find-list-options.model';
27+
import { followLink } from '../follow-link-config.model';
28+
import { RemoteData } from '../remote-data';
29+
import { RequestService } from '../request.service';
30+
import { RequestEntryState } from '../request-entry-state.model';
31+
import { RestRequestMethod } from '../rest-request-method';
3232
import {
3333
DeleteData,
3434
DeleteDataImpl,
35-
} from '@dspace/core';
36-
import { constructIdEndpointDefault } from '@dspace/core';
35+
} from './delete-data';
36+
import { constructIdEndpointDefault } from './identifiable-data.service';
37+
38+
3739

3840
/**
3941
* Tests whether calls to `DeleteData` methods are correctly patched through in a concrete data service that implements it

modules/core/src/lib/core/data/base/find-all-data.spec.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ import {
1111
} from 'rxjs';
1212
import { TestScheduler } from 'rxjs/testing';
1313

14-
import { RemoteDataBuildService } from '../../cache';
15-
import { RequestParam } from '../../cache';
14+
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
15+
import { RequestParam } from '../../cache/models/request-param.model';
1616
import {
1717
SortDirection,
1818
SortOptions,
19-
} from '../../cache';
20-
import { ObjectCacheService } from '../../cache';
21-
import { getMockRemoteDataBuildService } from '../../mocks';
22-
import { getMockRequestService } from '../../mocks';
23-
import { HALEndpointService } from '../../shared';
24-
import { HALEndpointServiceStub } from '../../utilities';
25-
import { FindListOptions } from '@dspace/core';
26-
import { followLink } from '@dspace/core';
27-
import { RemoteData } from '@dspace/core';
28-
import { RequestService } from '@dspace/core';
29-
import { RequestEntryState } from '@dspace/core';
30-
import { EMBED_SEPARATOR } from '@dspace/core';
19+
} from '../../cache/models/sort-options.model';
20+
import { ObjectCacheService } from '../../cache/object-cache.service';
21+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
22+
import { getMockRequestService } from '../../mocks/request.service.mock';
23+
import { HALEndpointService } from '../../shared/hal-endpoint.service';
24+
import { HALEndpointServiceStub } from '../../utilities/testing/hal-endpoint-service.stub';
25+
import { FindListOptions } from '../find-list-options.model';
26+
import { followLink } from '../follow-link-config.model';
27+
import { RemoteData } from '../remote-data';
28+
import { RequestService } from '../request.service';
29+
import { RequestEntryState } from '../request-entry-state.model';
30+
import { EMBED_SEPARATOR } from './base-data.service';
3131
import {
3232
FindAllData,
3333
FindAllDataImpl,
34-
} from '@dspace/core';
34+
} from './find-all-data';
3535

3636
/**
3737
* Tests whether calls to `FindAllData` methods are correctly patched through in a concrete data service that implements it

modules/core/src/lib/core/data/base/identifiable-data.service.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
import { of as observableOf } from 'rxjs';
99
import { TestScheduler } from 'rxjs/testing';
1010

11-
import { RemoteDataBuildService } from '../../cache';
12-
import { ObjectCacheService } from '../../cache';
13-
import { getMockRemoteDataBuildService } from '../../mocks';
14-
import { getMockRequestService } from '../../mocks';
15-
import { HALEndpointService } from '../../shared';
16-
import { HALEndpointServiceStub } from '../../utilities';
17-
import { followLink } from '@dspace/core';
18-
import { RemoteData } from '@dspace/core';
19-
import { RequestService } from '@dspace/core';
20-
import { RequestEntryState } from '@dspace/core';
21-
import { EMBED_SEPARATOR } from '@dspace/core';
22-
import { IdentifiableDataService } from '@dspace/core';
11+
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
12+
import { ObjectCacheService } from '../../cache/object-cache.service';
13+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
14+
import { getMockRequestService } from '../../mocks/request.service.mock';
15+
import { HALEndpointService } from '../../shared/hal-endpoint.service';
16+
import { HALEndpointServiceStub } from '../../utilities/testing/hal-endpoint-service.stub';
17+
import { followLink } from '../follow-link-config.model';
18+
import { RemoteData } from '../remote-data';
19+
import { RequestService } from '../request.service';
20+
import { RequestEntryState } from '../request-entry-state.model';
21+
import { EMBED_SEPARATOR } from './base-data.service';
22+
import { IdentifiableDataService } from './identifiable-data.service';
2323

2424
const base = 'https://rest.api/core';
2525
const endpoint = 'test';

modules/core/src/lib/core/data/base/patch-data.spec.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ import {
1616
} from 'rxjs';
1717
import { TestScheduler } from 'rxjs/testing';
1818

19-
import { RemoteDataBuildService } from '../../cache';
20-
import { ObjectCacheService } from '../../cache';
21-
import { getMockRemoteDataBuildService } from '../../mocks';
22-
import { getMockRequestService } from '../../mocks';
23-
import { DSpaceObject } from '../../shared';
24-
import { HALEndpointService } from '../../shared';
25-
import { Item } from '../../shared';
26-
import { createSuccessfulRemoteDataObject$ } from '@dspace/core';
27-
import { HALEndpointServiceStub } from '../../utilities';
28-
import { ChangeAnalyzer } from '@dspace/core';
29-
import { FindListOptions } from '@dspace/core';
30-
import { followLink } from '@dspace/core';
31-
import { RemoteData } from '@dspace/core';
32-
import { PatchRequest } from '@dspace/core';
33-
import { RequestService } from '@dspace/core';
34-
import { RequestEntryState } from '@dspace/core';
35-
import { RestRequestMethod } from '@dspace/core';
36-
import { constructIdEndpointDefault } from '@dspace/core';
19+
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
20+
import { ObjectCacheService } from '../../cache/object-cache.service';
21+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
22+
import { getMockRequestService } from '../../mocks/request.service.mock';
23+
import { DSpaceObject } from '../../shared/dspace-object.model';
24+
import { HALEndpointService } from '../../shared/hal-endpoint.service';
25+
import { Item } from '../../shared/item.model';
26+
import { createSuccessfulRemoteDataObject$ } from '../../utilities/remote-data.utils';
27+
import { HALEndpointServiceStub } from '../../utilities/testing/hal-endpoint-service.stub';
28+
import { ChangeAnalyzer } from '../change-analyzer';
29+
import { FindListOptions } from '../find-list-options.model';
30+
import { followLink } from '../follow-link-config.model';
31+
import { RemoteData } from '../remote-data';
32+
import { PatchRequest } from '../request.models';
33+
import { RequestService } from '../request.service';
34+
import { RequestEntryState } from '../request-entry-state.model';
35+
import { RestRequestMethod } from '../rest-request-method';
36+
import { constructIdEndpointDefault } from './identifiable-data.service';
3737
import {
3838
PatchData,
3939
PatchDataImpl,

modules/core/src/lib/core/data/base/put-data.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ import {
1111
of as observableOf,
1212
} from 'rxjs';
1313

14-
import { RemoteDataBuildService } from '../../cache';
15-
import { ObjectCacheService } from '../../cache';
16-
import { getMockRemoteDataBuildService } from '../../mocks';
17-
import { getMockRequestService } from '../../mocks';
18-
import { DSpaceObject } from '../../shared';
19-
import { HALEndpointService } from '../../shared';
20-
import { HALEndpointServiceStub } from '../../utilities';
21-
import { FindListOptions } from '@dspace/core';
22-
import { RemoteData } from '@dspace/core';
23-
import { RequestService } from '@dspace/core';
24-
import { RequestEntryState } from '@dspace/core';
25-
import { RestRequestMethod } from '@dspace/core';
14+
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
15+
import { ObjectCacheService } from '../../cache/object-cache.service';
16+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
17+
import { getMockRequestService } from '../../mocks/request.service.mock';
18+
import { DSpaceObject } from '../../shared/dspace-object.model';
19+
import { HALEndpointService } from '../../shared/hal-endpoint.service';
20+
import { HALEndpointServiceStub } from '../../utilities/testing/hal-endpoint-service.stub';
21+
import { FindListOptions } from '../find-list-options.model';
22+
import { RemoteData } from '../remote-data';
23+
import { RequestService } from '../request.service';
24+
import { RequestEntryState } from '../request-entry-state.model';
25+
import { RestRequestMethod } from '../rest-request-method';
2626
import {
2727
PutData,
2828
PutDataImpl,

modules/core/src/lib/core/data/base/search-data.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*/
88
import { of as observableOf } from 'rxjs';
99

10-
import { getMockRemoteDataBuildService } from '../../mocks';
11-
import { getMockRequestService } from '../../mocks';
12-
import { FindListOptions } from '@dspace/core';
13-
import { followLink } from '@dspace/core';
10+
import { getMockRemoteDataBuildService } from '../../mocks/remote-data-build.service.mock';
11+
import { getMockRequestService } from '../../mocks/request.service.mock';
12+
import { FindListOptions } from '../find-list-options.model';
13+
import { followLink } from '../follow-link-config.model';
1414
import {
1515
constructSearchEndpointDefault,
1616
SearchData,
1717
SearchDataImpl,
18-
} from '@dspace/core';
18+
} from './search-data';
1919

2020
/**
2121
* Tests whether calls to `SearchData` methods are correctly patched through in a concrete data service that implements it

modules/core/src/lib/core/data/bitstream-data.service.spec.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,38 @@ import {
55
of as observableOf,
66
} from 'rxjs';
77

8-
import { RemoteDataBuildService } from '../cache';
9-
import { RequestParam } from '../cache';
10-
import { ObjectCacheService } from '../cache';
11-
import { ItemMock } from '../mocks';
12-
import { getMockRemoteDataBuildService } from '../mocks';
13-
import { getMockRequestService } from '../mocks';
14-
import { NotificationsService } from '@dspace/core';
15-
import { Bitstream } from '../shared';
16-
import { BitstreamFormat } from '../shared';
17-
import { BitstreamFormatSupportLevel } from '../shared';
18-
import { Bundle } from '../shared';
19-
import { HALEndpointService } from '../shared';
8+
import objectContaining = jasmine.objectContaining;
9+
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
10+
import { RequestParam } from '../cache/models/request-param.model';
11+
import { ObjectCacheService } from '../cache/object-cache.service';
12+
import { ItemMock } from '../mocks/item.mock';
13+
import { getMockRemoteDataBuildService } from '../mocks/remote-data-build.service.mock';
14+
import { getMockRequestService } from '../mocks/request.service.mock';
15+
import { NotificationsService } from '../notifications/notifications.service';
16+
import { Bitstream } from '../shared/bitstream.model';
17+
import { BitstreamFormat } from '../shared/bitstream-format.model';
18+
import { BitstreamFormatSupportLevel } from '../shared/bitstream-format-support-level';
19+
import { Bundle } from '../shared/bundle.model';
20+
import { HALEndpointService } from '../shared/hal-endpoint.service';
2021
import {
2122
createFailedRemoteDataObject,
2223
createSuccessfulRemoteDataObject,
23-
} from '../utilities';
24-
import { HALEndpointServiceStub } from '../utilities';
25-
import { testDeleteDataImplementation } from './base';
26-
import { testPatchDataImplementation } from './base';
27-
import { testSearchDataImplementation } from './base';
28-
import { BitstreamDataService } from '@dspace/core';
29-
import { BitstreamFormatDataService } from '@dspace/core';
30-
import { BundleDataService } from '@dspace/core';
31-
import { DSOChangeAnalyzer } from '@dspace/core';
32-
import { FollowLinkConfig } from '@dspace/core';
33-
import { RemoteData } from '@dspace/core';
24+
} from '../utilities/remote-data.utils';
25+
import { HALEndpointServiceStub } from '../utilities/testing/hal-endpoint-service.stub';
26+
import { testDeleteDataImplementation } from './base/delete-data.spec';
27+
import { testPatchDataImplementation } from './base/patch-data.spec';
28+
import { testSearchDataImplementation } from './base/search-data.spec';
29+
import { BitstreamDataService } from './bitstream-data.service';
30+
import { BitstreamFormatDataService } from './bitstream-format-data.service';
31+
import { BundleDataService } from './bundle-data.service';
32+
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
33+
import { FollowLinkConfig } from './follow-link-config.model';
34+
import { RemoteData } from './remote-data';
3435
import {
3536
PatchRequest,
3637
PutRequest,
37-
} from '@dspace/core';
38-
import { RequestService } from '@dspace/core';
39-
import objectContaining = jasmine.objectContaining;
38+
} from './request.models';
39+
import { RequestService } from './request.service';
4040

4141
describe('BitstreamDataService', () => {
4242
let service: BitstreamDataService;

0 commit comments

Comments
 (0)