Package com.inspiresoftware.lib.dto.geda.examples.blog.dto

Examples of com.inspiresoftware.lib.dto.geda.examples.blog.dto.UserEntryDTO


        return dto;
    }

    public UserEntryDTO findEntry(final Long entryId) {
        final UserEntry entry = dao.findEntry(entryId);
        final UserEntryDTO dto = (UserEntryDTO) bf.get("UserEntryDTO");
        DTOAssembler.newAssembler(dto.getClass(), bf.getClazz("UserEntry"))
                .assembleDto(dto, entry, converters, bf);
        return dto;
    }
View Full Code Here


        // user selects first entry
        final BaseUserEntryDTO bobEntry = bobFull.getEntries().get(0);
        assertNotNull(bobEntry);

        // user clicks bob's entry to see replies
        final UserEntryDTO bobEntryFull = srv.findEntry(bobEntry.getEntryId());
        assertNotNull(bobEntryFull);
        assertEquals(bobEntryFull.getTitle(), "GeDA");
        assertEquals(bobEntryFull.getBody(), "Hey all, This GeDA stuff really works!!!");
        assertNotNull(bobEntryFull.getReplies());
        assertEquals(bobEntryFull.getReplies().size(), 1);


        // user finds the reply
        final BaseUserEntryDTO replyToBob = bobEntryFull.getReplies().get(0);
        assertNotNull(replyToBob);
        assertEquals(replyToBob.getTitle(), "RE: GeDA");
        assertEquals(replyToBob.getBody(), "Awesome!");

        // user clicks the reply to see full details
        final UserEntryDTO replyToBobFull = srv.findEntry(replyToBob.getEntryId());
        assertNotNull(replyToBobFull);
        assertNotNull(replyToBobFull.getUser());
        assertEquals(replyToBobFull.getUser().getUsername(), "John");

        // and so on...

    }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.examples.blog.dto.UserEntryDTO

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.