Package org.apache.rave.model

Examples of org.apache.rave.model.WidgetComment


    public void deleteAll(){
        String userId = "1234L";
        List<Widget> widgets = Lists.newArrayList();
        Widget w = new WidgetImpl();
        List<WidgetComment> comments = Lists.newArrayList();
        WidgetComment wc1 = new WidgetCommentImpl();
        WidgetComment wc2 = new WidgetCommentImpl();
        wc1.setUserId(userId);
        wc2.setUserId(userId);
        comments.add(wc1);
        comments.add(wc2);
        w.setComments(comments);
        widgets.add(w);
View Full Code Here


        String userId = "1234L";
        String userId_2 = "1111L";
        List<Widget> widgets = Lists.newArrayList();
        Widget w = new WidgetImpl();
        List<WidgetComment> comments = Lists.newArrayList();
        WidgetComment wc1 = new WidgetCommentImpl();
        WidgetComment wc2 = new WidgetCommentImpl();
        wc1.setUserId(userId_2);
        wc2.setUserId(userId_2);
        comments.add(wc1);
        comments.add(wc2);
        w.setComments(comments);
        widgets.add(w);
View Full Code Here

    public void get(){
        String id = "1234L";
        String widgetId = "321L";
        List<WidgetComment> comments = Lists.newArrayList();
        Widget widget = new WidgetImpl(widgetId);
        WidgetComment wc = new WidgetCommentImpl(id);
        comments.add(wc);
        widget.setComments(comments);

        expect(template.get(widgetId)).andReturn(widget);
        replay(template);

        WidgetComment result = repo.getCommentById(widgetId, id);
        assertThat(result.getId(), is(equalTo(id)));
    }
View Full Code Here

    public void get_null(){
        String id = "1234L";
        String widgetId = "321L";
        List<WidgetComment> comments = Lists.newArrayList();
        Widget widget = new WidgetImpl(widgetId);
        WidgetComment wc = new WidgetCommentImpl("1111L");
        comments.add(wc);
        widget.setComments(comments);

        expect(template.get(widgetId)).andReturn(widget);
        replay(template);

        WidgetComment result = repo.getCommentById(widgetId, id);
        assertNull(result);

    }
View Full Code Here

TOP

Related Classes of org.apache.rave.model.WidgetComment

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.