Ejemplo n.º 1
0
  @Test
  public void when_we_get_a_target_url_a_classpath_url_is_converted_to_a_file_url() {
    String staticSiteUrl =
        Thread.currentThread()
            .getContextClassLoader()
            .getResource("static-site/index.html")
            .toString();
    String url = PageUrls.getUrlFrom("classpath:static-site/index.html");

    assertThat(url, is(staticSiteUrl));
  }
Ejemplo n.º 2
0
  @Test
  public void when_we_get_a_target_url_a_normal_https_url_is_left_unprocessed() {
    String url = PageUrls.getUrlFrom("https://www.google.com");

    assertThat(url, is("https://www.google.com"));
  }