Package org.eurekastreams.server.domain.stream

Examples of org.eurekastreams.server.domain.stream.Activity


     * Test objectToString when passed an invalid type.
     */
    @Test
    public void testObjectToStringWrongType()
    {
        assertNull(sut.objectToString(new Activity()));
    }
View Full Code Here


    public void testObjectToStringFromActivityNote()
    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.NOTE);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

     * Test objectToString() when base object type is Note and there is content.
     */
    @Test
    public void testObjectToStringFromActivityNoteWithNoContent()
    {
        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.NOTE);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);
        baseObject.put("description", description);
        baseObject.put("targetTitle", targetTitle);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);
        baseObject.put("description", description);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);
        baseObject.put("targetTitle", targetTitle);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);
        baseObject.put("description", description);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    public void testObjectToStringFromActivityBookmarkWithContent()
    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("content", content);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    public void testObjectToStringFromActivityBookmarkWithDescription()
    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("description", description);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

    public void testObjectToStringFromActivityBookmarkWithTitle()
    {
        HashMap<String, String> baseObject = new HashMap<String, String>();
        baseObject.put("targetTitle", targetTitle);

        final Activity activity = new Activity();
        activity.setBaseObjectType(BaseObjectType.BOOKMARK);
        activity.setBaseObject(baseObject);

        CONTEXT.checking(new Expectations()
        {
            {
                oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
                will(returnValue(new ArrayList<Long>()));

                oneOf(commentsByIdDAO).execute(with(any(ArrayList.class)));
                will(returnValue(new ArrayList<CommentDTO>()));
            }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.stream.Activity

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.