Package org.eurekastreams.server.domain.stream

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


                allowing(metadata).getThumbnail();
                will(returnValue(thumbArr));
            }
        });

        Activity activity = new Activity();
        sut.build(feed, entry, activity);

        assertEquals(BaseObjectType.BOOKMARK, activity.getBaseObjectType());

        HashMap<String, String> result = activity.getBaseObject();

        assertEquals(title, result.get("targetTitle"));
        assertEquals(title, result.get("title"));
        assertEquals(linkBase + "/xyz", result.get("targetUrl"));
        assertEquals("", result.get("description"));
View Full Code Here


                allowing(metadata).getThumbnail();
                will(returnValue(thumbArr));
            }
        });

        Activity activity = new Activity();
        sut.build(feed, entry, activity);

        assertEquals(BaseObjectType.BOOKMARK, activity.getBaseObjectType());

        HashMap<String, String> result = activity.getBaseObject();

        assertEquals(title, result.get("targetTitle"));
        assertEquals(title, result.get("title"));
        assertEquals(linkBase + "/abc/xyz", result.get("targetUrl"));
        assertEquals("", result.get("description"));
View Full Code Here

                allowing(metadata).getThumbnail();
                will(returnValue(thumbArr));
            }
        });

        Activity activity = new Activity();
        sut.build(feed, entry, activity);

        assertEquals(BaseObjectType.BOOKMARK, activity.getBaseObjectType());

        HashMap<String, String> result = activity.getBaseObject();

        assertEquals(title, result.get("targetTitle"));
        assertEquals(title, result.get("title"));
        assertNull(result.get("targetUrl"));
        assertEquals("", result.get("description"));
View Full Code Here

                oneOf(content).getValue();
                will(returnValue("<p>><img src=\"" + FLICKR_URL + "\" width=\"240\" height=\"144\" /></a></p></"));
            }
        });

        Activity activity = new Activity();
        sut.build(feed, entry, activity);

        assertEquals(BaseObjectType.PHOTO, activity.getBaseObjectType());

        HashMap<String, String> result = activity.getBaseObject();
        assertEquals(title, result.get("title"));
        assertEquals(link1Href, result.get("largerImage"));
        assertEquals(link2Href, result.get("imagePageURL"));
        assertEquals(FLICKR_URL, result.get("thumbnail"));
        assertEquals("", result.get("description"));
View Full Code Here

                oneOf(content).getValue();
                will(returnValue("<p>><img src=\"" + FLICKR_URL + "\" width=\"240\" height=\"144\" /></a></p></"));
            }
        });

        Activity activity = new Activity();
        sut.build(feed, entry, activity);

        assertEquals(BaseObjectType.PHOTO, activity.getBaseObjectType());

        HashMap<String, String> result = activity.getBaseObject();
        assertEquals(title, result.get("title"));
        assertFalse(result.containsKey("largerImage"));
        assertFalse(result.containsKey("imagePageURL"));
        assertEquals(FLICKR_URL, result.get("thumbnail"));
        assertEquals("", result.get("description"));
View Full Code Here

                oneOf(getDomainGroupsByShortNamesMock).fetchId(testDomainGroupShortName);
                will(returnValue(testDomainGroupId));
            }
        });

        Activity activity = new Activity();
        activity.setRecipientStreamScope(new StreamScope(ScopeType.GROUP, testDomainGroupShortName));
        assertEquals("g" + testDomainGroupId, sut.objectToString(activity));
        context.assertIsSatisfied();
    }
View Full Code Here

     * Test objectToString for person.
     */
    @Test
    public void testObjectToStringForPersonFromActivityObject()
    {
        Activity activity = new Activity();
        activity.setRecipientStreamScope(new StreamScope(ScopeType.PERSON, testPersonAccountId));
        assertEquals("p" + testPersonId, sut.objectToString(activity));
        context.assertIsSatisfied();
    }
View Full Code Here

     * Test objectToString for unsupported entity type.
     */
    @Test(expected = RuntimeException.class)
    public void testObjectToStringForUnsupportedFromActivityObject()
    {
        Activity activity = new Activity();
        activity.setRecipientStreamScope(new StreamScope(ScopeType.ALL, "bleh"));
        sut.objectToString(activity);
        context.assertIsSatisfied();
    }
View Full Code Here

     */
    @Test(expected = RuntimeException.class)
    public void testObjectToStringWithoutPeopleByAccountIdMapper()
    {
        ActivityRecipientClassBridge.setGetPersonIdByAccountIdMapper(null);
        sut.objectToString(new Activity());
    }
View Full Code Here

     */
    @Test(expected = RuntimeException.class)
    public void testObjectToStringWithoutDomainGroupCache()
    {
        ActivityRecipientClassBridge.setGetDomainGroupsByShortNames(null);
        sut.objectToString(new Activity());
    }
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.