Package br.com.objectos.way.ui

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


        .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() {
    RequestURIGrep grep0 = RequestURIGrep.matchUris().equalTo("/login").build();
View Full Code Here


    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() {
    RequestURIGrep grep0 = RequestURIGrep.matchUris().equalTo("/login").build();
    RequestURIGrep grep1 = RequestURIGrep.matchUris().endsWith(".css").build();
View Full Code Here

        .from(grep0)
        .from(grep1)
        .from(grep2)
        .build();

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

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

        .from(grep1)
        .from(grep2)
        .build();

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

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

        .from(grep2)
        .build();

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

    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

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

    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));

    assertThat(grep.matches("/restricted"), is(true));
View Full Code Here

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

    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));

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

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

    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));

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

    assertThat(grep.matches("/log"), is(false));

    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));

    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));
View Full Code Here

    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));

    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

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.