Initial import of Angular5 components services and modules

Change-Id: I3953f1fbf7d5697a1c6d432808dd17d816ec285a
diff --git a/web/gui2/src/main/webapp/tests/app/view/apps/apps.component.spec.ts b/web/gui2/src/main/webapp/tests/app/view/apps/apps.component.spec.ts
new file mode 100644
index 0000000..f6ca0f8
--- /dev/null
+++ b/web/gui2/src/main/webapp/tests/app/view/apps/apps.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AppsComponent } from '../../../../app/view/apps/apps.component';
+
+describe('AppsComponent', () => {
+  let component: AppsComponent;
+  let fixture: ComponentFixture<AppsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ AppsComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AppsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/web/gui2/src/main/webapp/tests/app/view/apps/triggerform.directive.spec.ts b/web/gui2/src/main/webapp/tests/app/view/apps/triggerform.directive.spec.ts
new file mode 100644
index 0000000..6ec3d73
--- /dev/null
+++ b/web/gui2/src/main/webapp/tests/app/view/apps/triggerform.directive.spec.ts
@@ -0,0 +1,8 @@
+import { TriggerFormDirective } from '../../../../app/view/apps/triggerform.directive';
+
+describe('TriggerFormDirective', () => {
+  it('should create an instance', () => {
+    const directive = new TriggerFormDirective();
+    expect(directive).toBeTruthy();
+  });
+});
diff --git a/web/gui2/src/main/webapp/tests/app/view/device/device.component.spec.ts b/web/gui2/src/main/webapp/tests/app/view/device/device.component.spec.ts
new file mode 100644
index 0000000..e4e06a1
--- /dev/null
+++ b/web/gui2/src/main/webapp/tests/app/view/device/device.component.spec.ts
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * 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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DeviceComponent } from '../../../../app/view/device/device.component';
+
+/**
+ * ONOS GUI -- Device View Module - Unit Tests
+ */
+describe('DeviceComponent', () => {
+  let component: DeviceComponent;
+  let fixture: ComponentFixture<DeviceComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DeviceComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DeviceComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/web/gui2/src/main/webapp/tests/app/view/device/devicedetailspanel.directive.spec.ts b/web/gui2/src/main/webapp/tests/app/view/device/devicedetailspanel.directive.spec.ts
new file mode 100644
index 0000000..bbf3062
--- /dev/null
+++ b/web/gui2/src/main/webapp/tests/app/view/device/devicedetailspanel.directive.spec.ts
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * 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 { DeviceDetailsPanelDirective } from '../../../../app/view/device/devicedetailspanel.directive';
+import { KeyService } from '../../../../app/fw/util/key.service';
+import { LogService } from '../../../../app/log.service';
+import { FnService } from '../../../../app/fw/util/fn.service';
+import { ActivatedRoute, Router} from '@angular/router';
+
+class MockFunctionService extends FnService {
+    // Override things as necessary
+}
+
+class MockKeyService extends KeyService {
+    // Override things as necessary
+}
+/**
+ * ONOS GUI -- Device View Module - Unit Tests
+ */
+describe('DeviceDetailsPanelDirective', () => {
+    let ar: ActivatedRoute;
+    let log: LogService;
+    let ks: KeyService;
+    let fs: MockFunctionService;
+    let window: Window
+    let directive: DeviceDetailsPanelDirective;
+
+    beforeEach(() => {
+        log = new LogService();
+        ar = new ActivatedRoute();
+        fs = new MockFunctionService(ar, log);
+        ks = new MockKeyService(fs, log);
+        directive = new DeviceDetailsPanelDirective(ks, log, window);
+    });
+
+    afterEach(() => {
+        fs = null;
+        ks = null;
+        log = null;
+        ar = null;
+        directive = null;
+    });
+
+    it('should create an instance', () => {
+        expect(directive).toBeTruthy();
+    });
+});