Fix naming, add tests #5

Merged
manuel merged 19 commits from feature/use-proper-dirstructure into develop 2018-09-01 01:34:35 +02:00
6 changed files with 30 additions and 3 deletions
Showing only changes of commit 1b060644c3 - Show all commits

View file

@ -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},

View file

@ -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';

View 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!');
});
});

View 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=');
});
});