feature/upgrade #12
6 changed files with 30 additions and 3 deletions
|
@ -5,6 +5,7 @@ import {InputComponentManagerService} from './input-component-manager.service';
|
||||||
import {Step} from './step';
|
import {Step} from './step';
|
||||||
import {ConverterRegistryService} from './converter-registry.service';
|
import {ConverterRegistryService} from './converter-registry.service';
|
||||||
import {Converter} from './converter/converter';
|
import {Converter} from './converter/converter';
|
||||||
|
import {VersionComponent} from './version/version.component';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
let sut: AppComponent;
|
let sut: AppComponent;
|
||||||
|
@ -30,7 +31,7 @@ describe('AppComponent', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
/*return */
|
/*return */
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent, VersionComponent],
|
||||||
imports: [FormsModule],
|
imports: [FormsModule],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: InputComponentManagerService, useValue: inputComponentManagerServiceStub},
|
{provide: InputComponentManagerService, useValue: inputComponentManagerServiceStub},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Base64Decoder} from './converter/base64decoder';
|
import {Base64Decoder} from './converter/base64-decoder';
|
||||||
import {Base64Encoder} from './converter/base64encoder';
|
import {Base64Encoder} from './converter/base64-encoder';
|
||||||
import {BinToDecConverter} from './converter/bintodecconverter';
|
import {BinToDecConverter} from './converter/bintodecconverter';
|
||||||
import {Converter} from './converter/converter';
|
import {Converter} from './converter/converter';
|
||||||
import {DecToBinConverter} from './converter/dectobinconverter';
|
import {DecToBinConverter} from './converter/dectobinconverter';
|
||||||
|
|
13
src/app/converter/base64-decoder.spec.ts
Normal file
13
src/app/converter/base64-decoder.spec.ts
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import {Base64Decoder} from './base64-decoder';
|
||||||
|
|
||||||
|
describe('Base64Decoder', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new Base64Decoder()).toBeTruthy();
|
||||||
|
});
|
||||||
|
it('should have the id "base64decode"', () => {
|
||||||
|
expect(new Base64Decoder().getId()).toEqual('base64decode');
|
||||||
|
});
|
||||||
|
it('should decode "SGVsbG8sIFdvcmxkIQ==" to "Hello, World!"', () => {
|
||||||
|
expect(new Base64Decoder().convert('SGVsbG8sIFdvcmxkIQ==')).toEqual('Hello, World!');
|
||||||
|
});
|
||||||
|
});
|
13
src/app/converter/base64-encoder.spec.ts
Normal file
13
src/app/converter/base64-encoder.spec.ts
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import {Base64Encoder} from './base64-encoder';
|
||||||
|
|
||||||
|
describe('Base64Encoder', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new Base64Encoder()).toBeTruthy();
|
||||||
|
});
|
||||||
|
it('should have the id "base64encode"', () => {
|
||||||
|
expect(new Base64Encoder().getId()).toEqual('base64encode');
|
||||||
|
});
|
||||||
|
it('should encode "Oh, guete Tag!" to "T2gsIGd1ZXRlIFRhZyE="', () => {
|
||||||
|
expect(new Base64Encoder().convert('Oh, guete Tag!')).toEqual('T2gsIGd1ZXRlIFRhZyE=');
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue