Correct ConverterRegistryService.

This commit is contained in:
Manuel Friedli 2018-08-31 22:53:50 +02:00
parent 2c50fa0713
commit c4effd4f41
5 changed files with 37 additions and 20 deletions

View file

@ -3,7 +3,7 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {FormsModule} from '@angular/forms';
import {InputComponentManagerService} from './inputcomponentmanager.service';
import {Step} from './step';
import {ConverterRegistryService} from './converterregistry.service';
import {ConverterRegistryService} from './converter-registry.service';
import {Converter} from './converter/converter';
describe('AppComponent', () => {

View file

@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
import {ConverterRegistryService} from './converterregistry.service';
import {ConverterRegistryService} from './converter-registry.service';
import {InputComponentManagerService} from './inputcomponentmanager.service';
import {Step} from './step';
import {Converter} from './converter/converter';

View file

@ -1,7 +1,7 @@
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
import {ConverterRegistryService} from './converterregistry.service';
import {ConverterRegistryService} from './converter-registry.service';
import {InputComponentManagerService} from './inputcomponentmanager.service';
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
import {FormsModule} from '@angular/forms';

View file

@ -0,0 +1,15 @@
import { TestBed, inject } from '@angular/core/testing';
import { ConverterRegistryService } from './converter-registry.service';
describe('ConverterRegistryService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [ConverterRegistryService]
});
});
it('should be created', inject([ConverterRegistryService], (service: ConverterRegistryService) => {
expect(service).toBeTruthy();
}));
});

View file

@ -1,27 +1,29 @@
import {Injectable} from '@angular/core';
import {Converter} from './converter/converter';
import {Base64Encoder} from './converter/base64encoder';
import {Base64Decoder} from './converter/base64decoder';
import {URIEncoder} from './converter/uriencoder';
import {URIDecoder} from './converter/uridecoder';
import {URIComponentEncoder} from './converter/uricomponentencoder';
import {URIComponentDecoder} from './converter/uricomponentdecoder';
import {HTMLEntitiesEncoder} from './converter/htmlentitiesencoder';
import {HTMLEntitiesDecoder} from './converter/htmlentitiesdecoder';
import {Base64Encoder} from './converter/base64encoder';
import {BinToDecConverter} from './converter/bintodecconverter';
import {Converter} from './converter/converter';
import {DecToBinConverter} from './converter/dectobinconverter';
import {DecToHexConverter} from './converter/dectohexconverter';
import {HexToDecConverter} from './converter/hextodecconverter';
import {DecToBinConverter} from './converter/dectobinconverter';
import {BinToDecConverter} from './converter/bintodecconverter';
import {HTMLEntitiesDecoder} from './converter/htmlentitiesdecoder';
import {HTMLEntitiesEncoder} from './converter/htmlentitiesencoder';
import {Injectable} from '@angular/core';
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
import {PunycodeDecoder} from './converter/punycodedecoder';
import {PunycodeEncoder} from './converter/punycodeencoder';
import {QuotedPrintableDecoder} from './converter/quotedprintabledecoder';
import {QuotedPrintableEncoder} from './converter/quotedprintableencoder';
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
import {PunycodeEncoder} from './converter/punycodeencoder';
import {PunycodeDecoder} from './converter/punycodedecoder';
import {UTF8Encoder} from './converter/utf8encoder';
import {UTF8Decoder} from './converter/utf8decoder';
import {ROT13Converter} from './converter/rot13converter';
import {URIComponentDecoder} from './converter/uricomponentdecoder';
import {URIComponentEncoder} from './converter/uricomponentencoder';
import {URIDecoder} from './converter/uridecoder';
import {URIEncoder} from './converter/uriencoder';
import {UTF8Decoder} from './converter/utf8decoder';
import {UTF8Encoder} from './converter/utf8encoder';
@Injectable()
@Injectable({
providedIn: 'root'
})
export class ConverterRegistryService {
private converters: Converter[] = [];