import {URIComponentDecoder} from './uricomponent-decoder'; describe('URIComponentDecoder', () => { let sut: URIComponentDecoder; beforeEach(() => sut = new URIComponentDecoder()); it('should create an instance', () => { expect(sut).toBeTruthy(); }); it('should have a display name', () => { expect(sut.getDisplayname()).toBeTruthy(); }); it('should have the id "uricomponentdecode"', () => { expect(sut.getId()).toEqual('uricomponentdecode'); }); it('should decode "http%3A%2F%2Fm%C3%A4nu%3Agh%C3%ABim%40host%3Aport%2Fhi.there%3Foh%3Dwell%23ya" ' + 'to "http://mänu:ghëim@host:port/hi.there?oh=well#ya"', () => { expect(sut.convert('http%3A%2F%2Fm%C3%A4nu%3Agh%C3%ABim%40host%3Aport%2Fhi.there%3Foh%3Dwell%23ya')) .toEqual('http://mänu:ghëim@host:port/hi.there?oh=well#ya'); }); });