예제 #1
0
  public void testConstructor5() {

    String uri = "http://192.168.0.1:8080";

    Origin o = null;

    try {
      o = new Origin(uri);

    } catch (OriginException e) {
      fail(e.getMessage());
    }

    assertEquals(uri, o.toString());
  }
예제 #2
0
  public void testConstructor3() {

    String uri = "https://example.com";

    Origin o = null;

    try {
      o = new Origin(uri);

    } catch (OriginException e) {
      fail(e.getMessage());
    }

    assertEquals(uri, o.toString());
  }
예제 #3
0
  public void testConstructor4() {

    String uri = "file:///data/file.xml";

    Origin o = null;

    try {
      o = new Origin(uri);

    } catch (OriginException e) {
      fail(e.getMessage());
    }

    assertEquals(uri, o.toString());
  }
예제 #4
0
  public void testConstructor6() {

    String uri = "https://LOCALHOST:8080/my-app/upload.php";

    Origin o = null;

    try {
      o = new Origin(uri);

    } catch (OriginException e) {
      fail(e.getMessage());
    }

    assertEquals("https://localhost:8080", o.toString());
  }