Package br.com.objectos.way.ui

Examples of br.com.objectos.way.ui.RequestURIGrep.matches()


  public void equal_to() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .equalTo("/login")
        .build();

    assertThat(grep.matches("/login"), is(true));
    assertThat(grep.matches("/login/whatever"), is(false));
    assertThat(grep.matches("/log"), is(false));
  }

  public void ends_with() {
View Full Code Here


    RequestURIGrep grep = RequestURIGrep.matchUris()
        .equalTo("/login")
        .build();

    assertThat(grep.matches("/login"), is(true));
    assertThat(grep.matches("/login/whatever"), is(false));
    assertThat(grep.matches("/log"), is(false));
  }

  public void ends_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
View Full Code Here

        .equalTo("/login")
        .build();

    assertThat(grep.matches("/login"), is(true));
    assertThat(grep.matches("/login/whatever"), is(false));
    assertThat(grep.matches("/log"), is(false));
  }

  public void ends_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .endsWith(".css")
View Full Code Here

  public void ends_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .endsWith(".css")
        .build();

    assertThat(grep.matches("/style.css"), is(true));
    assertThat(grep.matches("/dir/style.css"), is(true));
    assertThat(grep.matches("/script.js"), is(false));
    assertThat(grep.matches("/dir/script.js"), is(false));
  }
View Full Code Here

    RequestURIGrep grep = RequestURIGrep.matchUris()
        .endsWith(".css")
        .build();

    assertThat(grep.matches("/style.css"), is(true));
    assertThat(grep.matches("/dir/style.css"), is(true));
    assertThat(grep.matches("/script.js"), is(false));
    assertThat(grep.matches("/dir/script.js"), is(false));
  }

  public void starts_with() {
View Full Code Here

        .endsWith(".css")
        .build();

    assertThat(grep.matches("/style.css"), is(true));
    assertThat(grep.matches("/dir/style.css"), is(true));
    assertThat(grep.matches("/script.js"), is(false));
    assertThat(grep.matches("/dir/script.js"), is(false));
  }

  public void starts_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
View Full Code Here

        .build();

    assertThat(grep.matches("/style.css"), is(true));
    assertThat(grep.matches("/dir/style.css"), is(true));
    assertThat(grep.matches("/script.js"), is(false));
    assertThat(grep.matches("/dir/script.js"), is(false));
  }

  public void starts_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .startsWith("/restricted")
View Full Code Here

  public void starts_with() {
    RequestURIGrep grep = RequestURIGrep.matchUris()
        .startsWith("/restricted")
        .build();

    assertThat(grep.matches("/restricted"), is(true));
    assertThat(grep.matches("/restricted/secret"), is(true));
    assertThat(grep.matches("/restricted/secret.pdf"), is(true));
    assertThat(grep.matches("/open"), is(false));
    assertThat(grep.matches("/open/restricted"), is(false));
  }
View Full Code Here

    RequestURIGrep grep = RequestURIGrep.matchUris()
        .startsWith("/restricted")
        .build();

    assertThat(grep.matches("/restricted"), is(true));
    assertThat(grep.matches("/restricted/secret"), is(true));
    assertThat(grep.matches("/restricted/secret.pdf"), is(true));
    assertThat(grep.matches("/open"), is(false));
    assertThat(grep.matches("/open/restricted"), is(false));
  }
View Full Code Here

        .startsWith("/restricted")
        .build();

    assertThat(grep.matches("/restricted"), is(true));
    assertThat(grep.matches("/restricted/secret"), is(true));
    assertThat(grep.matches("/restricted/secret.pdf"), is(true));
    assertThat(grep.matches("/open"), is(false));
    assertThat(grep.matches("/open/restricted"), is(false));
  }

  public void combination() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.