Support for concat TOSCA function
[sdc.git] / catalog-ui / src / app / ng2 / pages / properties-assignment / tosca-function / tosca-get-function / tosca-get-function.component.spec.ts
1 /*
2  * -
3  *  ============LICENSE_START=======================================================
4  *  Copyright (C) 2022 Nordix Foundation.
5  *  ================================================================================
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *
18  *  SPDX-License-Identifier: Apache-2.0
19  *  ============LICENSE_END=========================================================
20  */
21
22 import {async, ComponentFixture, TestBed} from '@angular/core/testing';
23 import {ToscaGetFunctionComponent} from './tosca-get-function.component';
24 import {FormsModule, ReactiveFormsModule} from "@angular/forms";
25 import {TranslateModule} from "../../../../shared/translator/translate.module";
26 import {UiElementsModule} from "../../../../components/ui/ui-elements.module";
27 import {TopologyTemplateService} from "../../../../services/component-services/topology-template.service";
28 import {WorkspaceService} from "../../../workspace/workspace.service";
29 import {PropertiesService} from "../../../../services/properties.service";
30 import {DataTypeService} from "../../../../services/data-type.service";
31 import {TranslateService} from "../../../../shared/translator/translate.service";
32 import {ComponentMetadata} from "../../../../../models/component-metadata";
33
34 describe('ToscaGetFunctionComponent', () => {
35     let component: ToscaGetFunctionComponent;
36     let fixture: ComponentFixture<ToscaGetFunctionComponent>;
37     let topologyTemplateServiceMock: Partial<TopologyTemplateService>;
38     let workspaceServiceMock: Partial<WorkspaceService> = {
39         metadata: new ComponentMetadata()
40     };
41     let propertiesServiceMock: Partial<PropertiesService>;
42     let dataTypeServiceMock: Partial<DataTypeService>;
43     let translateServiceMock: Partial<TranslateService>;
44
45     beforeEach(async(() => {
46         TestBed.configureTestingModule({
47             declarations: [ToscaGetFunctionComponent],
48             imports: [
49                 FormsModule,
50                 ReactiveFormsModule,
51                 TranslateModule,
52                 UiElementsModule
53             ],
54             providers: [
55                 {provide: TopologyTemplateService, useValue: topologyTemplateServiceMock},
56                 {provide: WorkspaceService, useValue: workspaceServiceMock},
57                 {provide: PropertiesService, useValue: propertiesServiceMock},
58                 {provide: DataTypeService, useValue: dataTypeServiceMock},
59                 {provide: TranslateService, useValue: translateServiceMock}
60             ]
61         })
62         .compileComponents();
63     }));
64
65     beforeEach(() => {
66         fixture = TestBed.createComponent(ToscaGetFunctionComponent);
67         component = fixture.componentInstance;
68         fixture.detectChanges();
69     });
70
71     it('should create', () => {
72         expect(component).toBeTruthy();
73     });
74 });