feature/upgrade #12

Merged
manuel merged 67 commits from feature/upgrade into master 2024-01-28 00:13:54 +01:00
5 changed files with 30 additions and 2 deletions
Showing only changes of commit f46604b523 - Show all commits

View file

@ -5,8 +5,8 @@ import {Converter} from './converter/converter';
import {DecToBinConverter} from './converter/dec-to-bin-converter';
import {DecToHexConverter} from './converter/dec-to-hex-converter';
import {HexToDecConverter} from './converter/hex-to-dec-converter';
import {HTMLEntitiesDecoder} from './converter/htmlentitiesdecoder';
import {HTMLEntitiesEncoder} from './converter/htmlentitiesencoder';
import {HTMLEntitiesDecoder} from './converter/htmlentities-decoder';
import {HTMLEntitiesEncoder} from './converter/htmlentities-encoder';
import {Injectable} from '@angular/core';
import {NativeLibraryWrapperService} from './native-library-wrapper.service';
import {PunycodeDecoder} from './converter/punycodedecoder';

View file

@ -0,0 +1,14 @@
import {HTMLEntitiesDecoder} from './htmlentities-decoder';
describe('HTMLEntitiesDecoder', () => {
it('should create an instance', () => {
expect(new HTMLEntitiesDecoder()).toBeTruthy();
});
it('should have the id "decodehtmlentities"', () => {
expect(new HTMLEntitiesDecoder().getId()).toEqual('decodehtmlentities');
});
it('should decode "&lt;span&gt;&quot;Hi&quot; &amp; &quot;Lo&quot;&lt;/span&gt;" to "<span>"Hi" & "Lo"</span>"', () => {
expect(new HTMLEntitiesDecoder().convert('&lt;span&gt;&quot;Hi&quot; &amp; &quot;Lo&quot;&lt;/span&gt;'))
.toEqual('<span>"Hi" & "Lo"</span>');
});
});

View file

@ -0,0 +1,14 @@
import {HTMLEntitiesEncoder} from './htmlentities-encoder';
describe('HTMLEntitiesEncoder', () => {
it('should create an instance', () => {
expect(new HTMLEntitiesEncoder()).toBeTruthy();
});
it('should have the id "encodehtmlentities"', () => {
expect(new HTMLEntitiesEncoder().getId()).toEqual('encodehtmlentities');
});
it('should encode "<span>"Hi" & "Lo"</span>" to "&lt;span&gt;&quot;Hi&quot; &amp; &quot;Lo&quot;&lt;/span&gt;"', () => {
expect(new HTMLEntitiesEncoder().convert('<span>"Hi" & "Lo"</span>'))
.toEqual('&lt;span&gt;&quot;Hi&quot; &amp; &quot;Lo&quot;&lt;/span&gt;');
});
});