Package org.jboss.arquillian.warp

Examples of org.jboss.arquillian.warp.Activity


    }

    @Test
    public void shouldAllowPATCHForAuthorizedAccess() throws Exception {
        final URL testURL = createTestURL();
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                    given().
                    then().
                        statusCode(Status.OK.getStatusCode()).
View Full Code Here


    @ArquillianResource
    private URL baseURL;

    @Test
    public void shouldRedirectToRefererOnAuthSuccess() throws Exception {
        Warp.initiate(new Activity() {

            @Override
            public void perform() {
                try {
                    final HttpURLConnection conn = (HttpURLConnection)new URL(baseURL, "auth").openConnection();
View Full Code Here

        });
    }

    @Test
    public void shouldReturnUnAuthorizedOnAuthFailure() throws Exception {
        Warp.initiate(new Activity() {

            @Override
            public void perform() {
                try {
                    final HttpURLConnection conn = (HttpURLConnection)new URL(baseURL, "auth").openConnection();
View Full Code Here

        target = new TargetObject(TARGET_ID);
    }

    @Test
    public void shouldBeAbleToAddRelation() throws Exception {
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                given().
                then().
                    contentType(BASE_XML_MEDIA_TYPE).
View Full Code Here

        type = "SPEAKING";
    }

    @Test @InSequence(1)
    public void shouldBeAbleToAddRelation() throws Exception {
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                given().
                    contentType(BASE_JSON_MEDIA_TYPE).
                    body(new ResourceLink("test", URI.create("http://test.org/api/test/" + TARGET_ID + "/"))).
View Full Code Here

    @Test
    public void shouldReturnOKOnGETResource() throws Exception {
        final DOMAIN domain = createDomainObject();

        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                responseValidation(
                    given().
                    then().
View Full Code Here

    private URL baseURL;

    @Test
    public void shouldReponseWithNotAuthorizedWhenNoUserFound() throws Exception {
        final URL whoAmIURL = createTestURL();
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                    given().
                    then().
                        statusCode(Status.UNAUTHORIZED.getStatusCode()).
View Full Code Here

    }

    @Test
    public void shouldReponseSeeOtherWhenUserFound() throws Exception {
        final URL whoAmIURL = createTestURL();
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                    given().
                        redirects().
                            follow(false).
View Full Code Here

     * <p>Tests retrieving the login page.</p>
     */
    @Test
    @RunAsClient
    public void testGetLogin() {
        Warp.initiate(new Activity() {

            @Override
            public void perform() {
                browser.navigate().to(contextPath + "login.do");
            }
View Full Code Here

    public void testLoginValidationErrors() {
        browser.navigate().to(contextPath + "login.do");
        browser.findElement(By.id("login")).clear();
        browser.findElement(By.id("password")).clear();

        Warp.initiate(new Activity() {

            @Override
            public void perform() {

                browser.findElement(By.id("loginForm")).submit();
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.warp.Activity

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.