Search in sources :

Example 1 with SimpleUrl

use of org.pentaho.platform.util.web.SimpleUrl in project pentaho-platform by pentaho.

the class SimpleUrlTest method testSimpleUrl.

public void testSimpleUrl() {
    // $NON-NLS-1$
    String baseUrl = "http://localhost:8080/pentaho";
    // $NON-NLS-1$
    SimpleUrlFactory urlFactory = new SimpleUrlFactory("/testurl?");
    urlFactory.getActionUrlBuilder();
    SimpleUrl url = new SimpleUrl(baseUrl);
    Assert.assertEquals(url.getUrl(), baseUrl);
    // $NON-NLS-1$  //$NON-NLS-2$
    url.setParameter("action", "doSomething");
    // $NON-NLS-1$
    Assert.assertEquals(url.getUrl(), baseUrl + "&action=doSomething");
}
Also used : SimpleUrlFactory(org.pentaho.platform.util.web.SimpleUrlFactory) SimpleUrl(org.pentaho.platform.util.web.SimpleUrl)

Aggregations

SimpleUrl (org.pentaho.platform.util.web.SimpleUrl)1 SimpleUrlFactory (org.pentaho.platform.util.web.SimpleUrlFactory)1