moved to single project
This commit is contained in:
22
ui/hv2-ui/src/app/test-output/test-output.component.html
Normal file
22
ui/hv2-ui/src/app/test-output/test-output.component.html
Normal file
@ -0,0 +1,22 @@
|
||||
<section class="mat-typography">
|
||||
<mat-card class="defaultCard">
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
Mein Test
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div>
|
||||
|
||||
<h2>Mein Test</h2>
|
||||
<pre>
|
||||
{{testOutput.message}}
|
||||
|
||||
{{testOutput.details}}
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</section>
|
25
ui/hv2-ui/src/app/test-output/test-output.component.spec.ts
Normal file
25
ui/hv2-ui/src/app/test-output/test-output.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestOutputComponent } from './test-output.component';
|
||||
|
||||
describe('TestOutputComponent', () => {
|
||||
let component: TestOutputComponent;
|
||||
let fixture: ComponentFixture<TestOutputComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TestOutputComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestOutputComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
29
ui/hv2-ui/src/app/test-output/test-output.component.ts
Normal file
29
ui/hv2-ui/src/app/test-output/test-output.component.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MessageService } from '../message.service';
|
||||
import { TestOutputService } from '../test-output.service';
|
||||
import { TestOutput } from '../testOutput';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test-output',
|
||||
templateUrl: './test-output.component.html',
|
||||
styleUrls: ['./test-output.component.css']
|
||||
})
|
||||
export class TestOutputComponent implements OnInit {
|
||||
|
||||
constructor(private testOutputService: TestOutputService, private messageService: MessageService) { }
|
||||
|
||||
testOutput : TestOutput = { "message": "abc", "details": "123" }
|
||||
|
||||
async getTestOutput() {
|
||||
try {
|
||||
this.testOutput = await this.testOutputService.getTestOutput();
|
||||
} catch (err) {
|
||||
this.messageService.add(JSON.stringify(err, undefined, 4))
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.messageService.add("TestOutputComponent.ngOnInit")
|
||||
this.getTestOutput();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user