diff --git a/ng2-components/ng2-alfresco-upload/src/services/renditions.service.spec.ts b/ng2-components/ng2-alfresco-upload/src/services/renditions.service.spec.ts new file mode 100644 index 0000000000..be00030f2d --- /dev/null +++ b/ng2-components/ng2-alfresco-upload/src/services/renditions.service.spec.ts @@ -0,0 +1,51 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing'; +import { EventEmitter } from '@angular/core'; +import { RenditionsService } from './renditions.service'; +import { AlfrescoSettingsService, AlfrescoApiService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; + +declare let AlfrescoApi: any; +declare let jasmine: any; + +describe('RenditionsService', () => { + let service: any; + + beforeEachProviders(() => { + return [ + AlfrescoSettingsService, + AlfrescoApiService, + AlfrescoAuthenticationService, + RenditionsService + ]; + }); + + beforeEach( inject([RenditionsService, AlfrescoApiService], (renditionsService: RenditionsService, apiService: AlfrescoApiService) => { + jasmine.Ajax.install(); + service = renditionsService; + apiService.setInstance(new AlfrescoApi({})); + })); + + afterEach(() => { + jasmine.Ajax.uninstall(); + }); + + it('', (done) => { + + }); +}); diff --git a/ng2-components/ng2-alfresco-upload/src/services/renditions.service.ts b/ng2-components/ng2-alfresco-upload/src/services/renditions.service.ts new file mode 100644 index 0000000000..7359e0a054 --- /dev/null +++ b/ng2-components/ng2-alfresco-upload/src/services/renditions.service.ts @@ -0,0 +1,36 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Injectable } from '@angular/core'; +import { AlfrescoApiService } from 'ng2-alfresco-core'; + +/** + * RenditionsService + * + * @returns {RenditionsService} . + */ +@Injectable() +export class RenditionsService { + + constructor(private apiService: AlfrescoApiService) { + + } + + private getRenditionsByNodeId(nodeId: string) { + + } +}