Package org.springbyexample.person.schema.beans

Examples of org.springbyexample.person.schema.beans.Person


        assertNotNull("Response is null.", response);
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, response.getPerson().size());
     
        Person person = response.getPerson().get(0);
     
        assertNotNull("Person is null.", person);
     
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());
   
        Person person2 = response.getPerson().get(1);
     
        assertNotNull("Person is null.", person2);
     
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
        assertEquals("Expected last name of '" + SECOND_LAST_NAME + "'.", SECOND_LAST_NAME, person2.getLastName());
       
        logger.debug("person1=[" +
                     "id=" + person.getId() +
                     "  firstName=" + person.getFirstName() +
                     "  lastName=" + person.getLastName() +
                     "]," +
                     "person2=[" +
                     "id=" + person2.getId() +
                     "  firstName=" + person2.getFirstName() +
                     "  lastName=" + person2.getLastName() +
                     "]");
    }
View Full Code Here


        assertNotNull("Response is null.", response);
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, response.getPerson().size());
     
        Person person = response.getPerson().get(0);
     
        assertNotNull("Person is null.", person);
     
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());
   
        Person person2 = response.getPerson().get(1);
     
        assertNotNull("Person is null.", person2);
     
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
        assertEquals("Expected last name of '" + SECOND_LAST_NAME + "'.", SECOND_LAST_NAME, person2.getLastName());
       
        logger.debug("person1=[" +
                     "id=" + person.getId() +
                     "  firstName=" + person.getFirstName() +
                     "  lastName=" + person.getLastName() +
                     "]," +
                     "person2=[" +
                     "id=" + person2.getId() +
                     "  firstName=" + person2.getFirstName() +
                     "  lastName=" + person2.getLastName() +
                     "]");
    }
View Full Code Here

    @Test
    public void testMarshaller() {
        assertNotNull("Marshaller is null.", marshaller);

        PersonResponse personList = new PersonResponse().withPerson(
                new Person().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME),
                new Person().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME));
               
        ByteArrayOutputStream out = new ByteArrayOutputStream();
       
        try {
            marshaller.marshal(personList, new StreamResult(out));
View Full Code Here

        PersonResponse personResponse = (PersonResponse)value;
       
        int expectedSize = 2;
        assertEquals("Expected person list to be a size of '" + expectedSize + "'.", expectedSize, personResponse.getPerson().size());
       
        Person person = personResponse.getPerson().get(0);
       
        assertNotNull("Person is null.", person);
       
        assertEquals("Expected id of '" + ID + "'.", ID.intValue(), person.getId());
        assertEquals("Expected first name of '" + FIRST_NAME + "'.", FIRST_NAME, person.getFirstName());
        assertEquals("Expected last name of '" + LAST_NAME + "'.", LAST_NAME, person.getLastName());

        Person person2 = personResponse.getPerson().get(1);
       
        assertNotNull("Person is null.", person2);
       
        assertEquals("Expected id of '" + SECOND_ID + "'.", SECOND_ID.intValue(), person2.getId());
        assertEquals("Expected first name of '" + SECOND_FIRST_NAME + "'.", SECOND_FIRST_NAME, person2.getFirstName());
        assertEquals("Expected last name of '" + SECOND_LAST_NAME + "'.", SECOND_LAST_NAME, person2.getLastName());
    }
View Full Code Here

     */
    @PayloadRoot(localPart=GET_PERSONS_REQUEST, namespace=NAMESPACE)
    public PersonResponse getPersons(GetPersonsRequest request) {
        return new PersonResponse().withPerson(
                   person,
                   new Person().withId(2).withFirstName("John").withLastName("Jackson"));       
    }
View Full Code Here

     * Gets person list.
     */
    @PayloadRoot(localPart=GET_PERSONS_REQUEST, namespace=NAMESPACE)
    public PersonResponse getPersons(GetPersonsRequest request) {
        return new PersonResponse().withPerson(
                   new Person().withId(1).withFirstName("Joe").withLastName("Smith"),
                   new Person().withId(2).withFirstName("John").withLastName("Jackson"));       
    }
View Full Code Here

TOP

Related Classes of org.springbyexample.person.schema.beans.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.