Correct ConverterRegistryService.
This commit is contained in:
parent
2c50fa0713
commit
c4effd4f41
5 changed files with 37 additions and 20 deletions
|
@ -3,7 +3,7 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
||||||
import {Step} from './step';
|
import {Step} from './step';
|
||||||
import {ConverterRegistryService} from './converterregistry.service';
|
import {ConverterRegistryService} from './converter-registry.service';
|
||||||
import {Converter} from './converter/converter';
|
import {Converter} from './converter/converter';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ConverterRegistryService} from './converterregistry.service';
|
import {ConverterRegistryService} from './converter-registry.service';
|
||||||
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
||||||
import {Step} from './step';
|
import {Step} from './step';
|
||||||
import {Converter} from './converter/converter';
|
import {Converter} from './converter/converter';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {BrowserModule} from '@angular/platform-browser';
|
import {BrowserModule} from '@angular/platform-browser';
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {ConverterRegistryService} from './converterregistry.service';
|
import {ConverterRegistryService} from './converter-registry.service';
|
||||||
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
||||||
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
|
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
|
|
15
src/app/converter-registry.service.spec.ts
Normal file
15
src/app/converter-registry.service.spec.ts
Normal 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();
|
||||||
|
}));
|
||||||
|
});
|
|
@ -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 {Base64Decoder} from './converter/base64decoder';
|
||||||
import {URIEncoder} from './converter/uriencoder';
|
import {Base64Encoder} from './converter/base64encoder';
|
||||||
import {URIDecoder} from './converter/uridecoder';
|
import {BinToDecConverter} from './converter/bintodecconverter';
|
||||||
import {URIComponentEncoder} from './converter/uricomponentencoder';
|
import {Converter} from './converter/converter';
|
||||||
import {URIComponentDecoder} from './converter/uricomponentdecoder';
|
import {DecToBinConverter} from './converter/dectobinconverter';
|
||||||
import {HTMLEntitiesEncoder} from './converter/htmlentitiesencoder';
|
|
||||||
import {HTMLEntitiesDecoder} from './converter/htmlentitiesdecoder';
|
|
||||||
import {DecToHexConverter} from './converter/dectohexconverter';
|
import {DecToHexConverter} from './converter/dectohexconverter';
|
||||||
import {HexToDecConverter} from './converter/hextodecconverter';
|
import {HexToDecConverter} from './converter/hextodecconverter';
|
||||||
import {DecToBinConverter} from './converter/dectobinconverter';
|
import {HTMLEntitiesDecoder} from './converter/htmlentitiesdecoder';
|
||||||
import {BinToDecConverter} from './converter/bintodecconverter';
|
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 {QuotedPrintableDecoder} from './converter/quotedprintabledecoder';
|
||||||
import {QuotedPrintableEncoder} from './converter/quotedprintableencoder';
|
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 {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 {
|
export class ConverterRegistryService {
|
||||||
private converters: Converter[] = [];
|
private converters: Converter[] = [];
|
||||||
|
|
Loading…
Reference in a new issue