angular cli

This commit is contained in:
lotte
2020-03-18 16:03:40 +01:00
parent 41969ec3b1
commit 8bf241c182
503 changed files with 5303 additions and 9574 deletions

View File

@@ -5,12 +5,12 @@ import { TestScheduler } from 'rxjs/testing';
import { of as observableOf } from 'rxjs';
import { Store, StoreModule } from '@ngrx/store';
import { getMockRequestService } from '../../shared/mocks/mock-request.service';
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
import { RequestService } from '../data/request.service';
import { SubmissionPatchRequest } from '../data/request.models';
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service-stub';
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
import { getMockRemoteDataBuildService } from '../../shared/mocks/mock-remote-data-build.service';
import { getMockRemoteDataBuildService } from '../../shared/mocks/remote-data-build.service.mock';
import { JsonPatchOperationsService } from './json-patch-operations.service';
import { SubmitDataResponseDefinitionObject } from '../shared/submit-data-response-definition.model';
import { CoreState } from '../core.reducers';
@@ -21,9 +21,10 @@ import {
RollbacktPatchOperationsAction,
StartTransactionPatchOperationsAction
} from './json-patch-operations.actions';
import { MockStore } from '../../shared/testing/mock-store';
import { StoreMock } from '../../shared/testing/store.mock';
import { RequestEntry } from '../data/request.reducer';
import { catchError } from 'rxjs/operators';
import { storeModuleConfig } from '../../app.reducer';
class TestService extends JsonPatchOperationsService<SubmitDataResponseDefinitionObject, SubmissionPatchRequest> {
protected linkPath = '';
@@ -101,10 +102,10 @@ describe('JsonPatchOperationsService test suite', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
StoreModule.forRoot({}),
StoreModule.forRoot({}, storeModuleConfig),
],
providers: [
{ provide: Store, useClass: MockStore }
{ provide: Store, useClass: StoreMock }
]
}).compileComponents();
}));
@@ -114,7 +115,7 @@ describe('JsonPatchOperationsService test suite', () => {
requestService = getMockRequestService(getRequestEntry$(true));
rdbService = getMockRemoteDataBuildService();
scheduler = getTestScheduler();
halService = new HALEndpointServiceStub(resourceEndpointURL);
halService = new HalEndpointServiceStub(resourceEndpointURL);
service = initTestService();
spyOn(store, 'select').and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));
@@ -167,7 +168,7 @@ describe('JsonPatchOperationsService test suite', () => {
requestService = getMockRequestService(getRequestEntry$(false));
rdbService = getMockRemoteDataBuildService();
scheduler = getTestScheduler();
halService = new HALEndpointServiceStub(resourceEndpointURL);
halService = new HalEndpointServiceStub(resourceEndpointURL);
service = initTestService();
store.select.and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));
@@ -230,7 +231,7 @@ describe('JsonPatchOperationsService test suite', () => {
requestService = getMockRequestService(getRequestEntry$(false));
rdbService = getMockRemoteDataBuildService();
scheduler = getTestScheduler();
halService = new HALEndpointServiceStub(resourceEndpointURL);
halService = new HalEndpointServiceStub(resourceEndpointURL);
service = initTestService();
store.select.and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));