Merge "Add code for data format webtool"
[dcaegen2/platform/cli.git] / dcaedftool / src / app / df-control.component.spec.ts
1 // org.onap.dcae\r
2 // ============LICENSE_START====================================================\r
3 // Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
4 // =============================================================================\r
5 // Licensed under the Apache License, Version 2.0 (the "License");\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 // ============LICENSE_END======================================================\r
17 //\r
18 // ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
19 import { NgModule } from '@angular/core';\r
20 import { BrowserModule } from '@angular/platform-browser';\r
21 import {HttpModule} from '@angular/http';  // for future\r
22 import {FormsModule, ReactiveFormsModule} from '@angular/forms'; // for future\r
23 import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; // for future\r
24 import { MaterialModule } from '@angular/material';\r
25 import { FlexLayoutModule } from '@angular/flex-layout';\r
26 import { APP_BASE_HREF } from '@angular/common';\r
27 \r
28 import {ValidateMetaSchemaService} from './validate-metaschema.service';\r
29 import {ValidateJSONService} from './validate-json.service';\r
30 import {MetaSchemaService} from './metaschema.service';\r
31 import {DFJSONInputComponent} from './df-jsoninput.component';\r
32 import {DFSchemaComponent} from './df-schema.component';\r
33 import {DFControlComponent} from './df-control.component';\r
34 import { RouterModule, Routes } from '@angular/router';\r
35 \r
36 \r
37 import { async, ComponentFixture, TestBed } from '@angular/core/testing';\r
38 import { By } from '@angular/platform-browser';\r
39 import { DebugElement } from '@angular/core';\r
40 \r
41 describe('DFControlComponent Tests', function () {\r
42   let de: DebugElement;\r
43   let comp: DFControlComponent;\r
44   let fixture: ComponentFixture<DFControlComponent>;\r
45   const dfroutes: Routes = [\r
46     { path: '', redirectTo: 'schemaval', pathMatch: 'full' },\r
47     { path: 'schemaval',  component: DFSchemaComponent },\r
48     { path: 'jsoninput',  component: DFJSONInputComponent },\r
49 \r
50   ];\r
51   beforeEach(async(() => {\r
52     TestBed.configureTestingModule({\r
53       imports:      [  BrowserModule,\r
54         BrowserAnimationsModule,\r
55         FormsModule,\r
56         HttpModule,\r
57         ReactiveFormsModule,\r
58         FlexLayoutModule,\r
59         RouterModule.forRoot(dfroutes),\r
60         MaterialModule,\r
61 \r
62         ],\r
63       providers: [{provide: APP_BASE_HREF, useValue: '/'},\r
64       ValidateMetaSchemaService,\r
65       ValidateJSONService,\r
66       MetaSchemaService\r
67                   ],\r
68       declarations: [\r
69                       DFJSONInputComponent,\r
70                         DFControlComponent,\r
71                         DFSchemaComponent,\r
72 \r
73                    ]\r
74     })\r
75     .compileComponents();\r
76   }));\r
77 \r
78   beforeEach(() => {\r
79     fixture = TestBed.createComponent(DFControlComponent);\r
80     comp = fixture.componentInstance;\r
81     //de = fixture.debugElement.query(By.css('h1'));\r
82   });\r
83 \r
84   it('should create component', () => expect(comp).toBeDefined() );\r
85 \r
86 });\r