Package com.google.sitebricks.example.model

Examples of com.google.sitebricks.example.model.Person


@Test(suiteName = AcceptanceTest.SUITE)
public class RestfulWebServiceValidatingDaoAcceptanceTest {

    public void shouldValidateGet() {

        Person person = new Person();
        person.setFirstName("firstName");
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidatingdao")
                .transports(Person.class).over(Json.class).get();

        assert response.toString().contains(person.getLastName());

    }
View Full Code Here


    }

    public void shouldValidatePost() {

        Person person = new Person();
        person.setFirstName("firstName");
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidatingdao")
                .transports(Person.class).over(Json.class).post(person);

        assert response.toString().contains(person.getLastName());

    }
View Full Code Here

    }

    public void shouldReceiveExceptionValidatePost() {

        Person person = new Person();
        person.setFirstName(null);
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidatingdao")
                .transports(Person.class).over(Json.class).post(person);
View Full Code Here

    private SimpleDao dao;
   
    private Person person;
   
    public HtmlValidating() {
      this.person = new Person();
    }
View Full Code Here

    private SimpleDao dao;
   
    private Person person;
   
    public JspValidating() {
      this.person = new Person();
    }
View Full Code Here

    private SimpleDao dao;
   
    @Get
    @As(Json.class)
    Reply<Person> newPerson() {
        return Reply.with(new Person());
    }
View Full Code Here

    private ValidationConverter validationConverter;

    @Get
    @As(Json.class)
    Reply<Person> newPerson() {
      return Reply.with(new Person());
    }
View Full Code Here

@Test(suiteName = AcceptanceTest.SUITE)
public class RestfulWebServiceValidatingAcceptanceTest {

    public void shouldValidateGet() {

        Person person = new Person();
        person.setFirstName("firstName");
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidating")
                .transports(Person.class).over(Json.class).get();

        assert response.toString().contains(person.getLastName());

    }
View Full Code Here

    }

    public void shouldValidatePost() {

        Person person = new Person();
        person.setFirstName("firstName");
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidating")
                .transports(Person.class).over(Json.class).post(person);

        assert response.toString().contains(person.getLastName());

    }
View Full Code Here

    }

    public void shouldReceiveExceptionValidatePost() {

        Person person = new Person();
        person.setFirstName(null);
        person.setLastName("lastName");
        person.setAge(20);

        WebResponse response = createInjector().getInstance(Web.class)
                .clientOf(AcceptanceTest.baseUrl() + "/restvalidating")
                .transports(Person.class).over(Json.class).post(person);
View Full Code Here

TOP

Related Classes of com.google.sitebricks.example.model.Person

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.