Package ch.ethz.iks.slp

Examples of ch.ethz.iks.slp.ServiceURL


    assertTrue("".equals(url.getServiceType().getNamingAuthority()));
  }
 
  public void testServiceURLNamingAuthorityIana() throws Exception {
    String urlString = "service:test.iana://http://localhost";
    ServiceURL url = new ServiceURL(urlString, 0);
    assertEquals(url.getServiceType().toString(), "service:test");
    assertEquals(url.getHost(), "localhost");
    assertEquals(url.getPort(), 0);
    assertEquals(url.getURLPath(), "");
    assertEquals(url.getUserInfo(), "");
    assertEquals(url.getProtocol(), "http");
    assertEquals(url.toString(), "service:test://http://localhost");
    assertTrue("".equals(url.getServiceType().getNamingAuthority()));
  }
View Full Code Here


    assertTrue("".equals(url.getServiceType().getNamingAuthority()));
  }
 
  public void testServiceURLUserInfo() throws Exception {
    String urlString = "service:test.iana://http://foobar@localhost";
    ServiceURL url = new ServiceURL(urlString, 0);
    assertEquals(url.getServiceType().toString(), "service:test");
    assertEquals(url.getHost(), "localhost");
    assertEquals(url.getPort(), 0);
    assertEquals(url.getURLPath(), "");
    assertEquals(url.getProtocol(), "http");
    assertEquals(url.toString(), "service:test://http://foobar@localhost");
    assertEquals(url.getUserInfo(), "foobar");
    assertTrue("".equals(url.getServiceType().getNamingAuthority()));
  }
View Full Code Here

  }
 
  // https://bugs.eclipse.org/258252
  public void testServiceURL258252a() throws Exception {
    String urlString = "service:test:myservice://localhost:80/my:path";
    ServiceURL url = new ServiceURL(urlString, 0);
    assertEquals(url.getServiceType().toString(), "service:test:myservice");
    assertEquals(url.getHost(), "localhost");
    assertEquals(url.getPort(), 80);
    assertEquals(url.getURLPath(), "/my:path");
    assertEquals(url.getUserInfo(), "");
    assertEquals(url.getProtocol(), null);
    assertEquals(url.toString(), urlString);
  }
View Full Code Here

    assertEquals(url.getProtocol(), null);
    assertEquals(url.toString(), urlString);
  }
  public void testServiceURL258252b() throws Exception {
    String urlString = "service:test:myservice://localhost/my:path";
    ServiceURL url = new ServiceURL(urlString, 0);
    assertEquals(url.getServiceType().toString(), "service:test:myservice");
    assertEquals(url.getHost(), "localhost");
    assertEquals(url.getPort(), 0);
    assertEquals(url.getURLPath(), "/my:path");
    assertEquals(url.getUserInfo(), "");
    assertEquals(url.getProtocol(), null);
    assertEquals(url.toString(), urlString);
  }
View Full Code Here

    assertEquals(url.getProtocol(), null);
    assertEquals(url.toString(), urlString);
  }
  public void testServiceURL258252c() throws Exception {
    String urlString = "service:test:myservice://localhost/foo/bar#path";
    ServiceURL url = new ServiceURL(urlString, 0);
    assertEquals(url.getServiceType().toString(), "service:test:myservice");
    assertEquals(url.getHost(), "localhost");
    assertEquals(url.getPort(), 0);
    assertEquals(url.getURLPath(), "/foo/bar#path");
    assertEquals(url.getUserInfo(), "");
    assertEquals(url.getProtocol(), null);
    assertEquals(url.toString(), urlString);
  }
View Full Code Here

TOP

Related Classes of ch.ethz.iks.slp.ServiceURL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.