diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index a82fbf1..0454090 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -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', () => { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1ec7c84..45ad694 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -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'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7ef864d..88e730c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -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'; diff --git a/src/app/converter-registry.service.spec.ts b/src/app/converter-registry.service.spec.ts new file mode 100644 index 0000000..2b97a17 --- /dev/null +++ b/src/app/converter-registry.service.spec.ts @@ -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(); + })); +}); diff --git a/src/app/converterregistry.service.ts b/src/app/converter-registry.service.ts similarity index 98% rename from src/app/converterregistry.service.ts rename to src/app/converter-registry.service.ts index 4d66673..4067b3d 100644 --- a/src/app/converterregistry.service.ts +++ b/src/app/converter-registry.service.ts @@ -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[] = [];