Package play.mvc.Http

Examples of play.mvc.Http.Response


        Response response = GET(url);
        assertJson(response);
    }

    private void jsonDetails(String url) {
        Response response = GET(url+"?details=true");
        assertJson(response);
    }
View Full Code Here


        Response response = GET(url+"?details=true");
        assertJson(response);
    }

    private void jsonp(String url) {
        Response response = GET(url+"?callback=mycallback");
        assertJsonp(response, "mycallback");
    }
View Full Code Here

        Response response = GET(url+"?callback=mycallback");
        assertJsonp(response, "mycallback");
    }

    private void jsonpDetails(String url) {
        Response response = GET(url+"?callback=mycallback&details=true");
        assertJsonp(response, "mycallback");
    }
View Full Code Here

        test("/api/members/"+m.id);
    }

    @Test
    public void testMember_notFound() {
        Response r = GET("/api/members/999999");
        assertStatus(404, r);
    }
View Full Code Here

        test("/api/members/"+m.id+"/favorites");
    }

    @Test
    public void testMemberFavorites_notFound() {
        Response r = GET("/api/members/999999/favorites");
        assertStatus(404, r);
    }
View Full Code Here

        test("/api/talks/"+t.id);
    }

    @Test
    public void testTalk_notFound() {
        Response r = GET("/api/talks/999999");
        assertStatus(404, r);
    }
View Full Code Here

        test("/api/lightningtalks/"+lt.id);
    }

    @Test
    public void testLightningalk_notFound() {
        Response r = GET("/api/lightningtalks/999999");
        assertStatus(404, r);
    }
View Full Code Here

        test("/api/interests/"+i.id);
    }

    @Test
    public void testInterest_notFound() {
        Response r = GET("/api/interests/999999");
        assertStatus(404, r);
    }
View Full Code Here


public class ApplicationTest extends FunctionalTest {
  @Test
  public void testThatIndexPageWorks() {
    Response response = GET("/");
   
    assertIsOk(response);
    assertContentType("text/html", response);
    assertCharset(play.Play.defaultWebEncoding, response);
  }
View Full Code Here

        when(request.method()).thenReturn(METHOD);
        when(request.path()).thenReturn(PATH);
        when(request.queryString()).thenReturn(ImmutableMap.<String, String[]>of());
        when(jwtIssuerValidator.isValid(anyString())).thenReturn(true);
        when(jwtIssuerSharedSecretService.getSharedSecret(anyString())).thenReturn(PASSWORD);
        Response response = new Response();
        return jwtAuthenticator.authenticate(request, response).getResult();
    }
View Full Code Here

TOP

Related Classes of play.mvc.Http.Response

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.