mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
98211: Added tests
This commit is contained in:
10
src/app/shared/testing/claimed-task-data-service.stub.ts
Normal file
10
src/app/shared/testing/claimed-task-data-service.stub.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Observable, EMPTY } from 'rxjs';
|
||||
import { ProcessTaskResponse } from '../../core/tasks/models/process-task-response';
|
||||
|
||||
export class ClaimedTaskDataServiceStub {
|
||||
|
||||
public submitTask(_scopeId: string, _body: any): Observable<ProcessTaskResponse> {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
}
|
12
src/app/shared/testing/data-service.stub.ts
Normal file
12
src/app/shared/testing/data-service.stub.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { FollowLinkConfig } from '../utils/follow-link-config.model';
|
||||
import { Observable, EMPTY } from 'rxjs';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { CacheableObject } from '../../core/cache/object-cache.reducer';
|
||||
|
||||
export abstract class DataServiceStub<T extends CacheableObject> {
|
||||
|
||||
findById(_id: string, _useCachedVersionIfAvailable = true, _reRequestOnStale = true, ..._linksToFollow: FollowLinkConfig<T>[]): Observable<RemoteData<T>> {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
}
|
15
src/app/shared/testing/workflow-action-data-service.stub.ts
Normal file
15
src/app/shared/testing/workflow-action-data-service.stub.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { FindListOptions } from '../../core/data/request.models';
|
||||
import { FollowLinkConfig } from '../utils/follow-link-config.model';
|
||||
import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model';
|
||||
import { Observable, EMPTY } from 'rxjs';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { WorkflowItem } from '../../core/submission/models/workflowitem.model';
|
||||
import { DataServiceStub } from './data-service.stub';
|
||||
|
||||
export class WorkflowActionDataServiceStub extends DataServiceStub<WorkflowItem> {
|
||||
|
||||
public findByItem(_uuid: string, _useCachedVersionIfAvailable = false, _reRequestOnStale = true, _options: FindListOptions = {}, ..._linksToFollow: FollowLinkConfig<WorkspaceItem>[]): Observable<RemoteData<WorkspaceItem>> {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
import { DataServiceStub } from './data-service.stub';
|
||||
import { WorkflowItem } from '../../core/submission/models/workflowitem.model';
|
||||
|
||||
export class WorkflowItemDataServiceStub extends DataServiceStub<WorkflowItem> {
|
||||
}
|
Reference in New Issue
Block a user