import { URIUtil } from "dasf-web/lib/util/URIUtils";

describe("URIUtil Test", ()=>{

    test('test build query', ()=>{
        var queryObject: Object = {service: "WFS",
                                    version: "2.0.0",
                                    request: "GetFeature"};
        
        var query: string = URIUtil.buildQuery(queryObject);

        expect(query).toEqual("service=WFS&version=2.0.0&request=GetFeature");
    });
    
    test('test build query with empty value', ()=>{
        var queryObject: Object = {service: "WFS",
                                    version: "2.0.0",
                                    request: ""};
        
        var query: string = URIUtil.buildQuery(queryObject);

        expect(query).toEqual("service=WFS&version=2.0.0");
    });

});