Package com.wesabe.grendel.representations

Examples of com.wesabe.grendel.representations.CreateUserRepresentation


  public static class A_Valid_New_User_Request {
    private CreateUserRepresentation req;
   
    @Before
    public void setup() throws Exception {
      this.req = new CreateUserRepresentation();
     
      req.setId("dingo");
      req.setPassword("happenstance".toCharArray());
    }
View Full Code Here


  public static class An_Invalid_New_User_Request {
    private CreateUserRepresentation req;
   
    @Before
    public void setup() throws Exception {
      this.req = new CreateUserRepresentation();
    }
View Full Code Here

    @Test
    public void itDeserializesJSON() throws Exception {
      final String json = "{\"id\":\"mrpeepers\",\"password\":\"hoohah\"}";
     
      final ObjectMapper mapper = new ObjectMapper();
      final CreateUserRepresentation rep = mapper.readValue(json, CreateUserRepresentation.class);
     
      assertThat(rep.getId()).isEqualTo("mrpeepers");
      assertThat(rep.getPassword()).isEqualTo("hoohah".toCharArray());
    }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.representations.CreateUserRepresentation

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.