Package org.eurekastreams.server.domain.stream

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


     */
    @Test
    public void testResolveActivityBody()
    {
        final ActivityDTO activity = context.mock(ActivityDTO.class, "activity");
        final StreamEntityDTO actor = context.mock(StreamEntityDTO.class, "actor");
        final HashMap<String, String> baseObjectProps = new HashMap<String, String>();
        context.checking(new Expectations()
        {
            {
                allowing(activity).getBaseObjectProperties();
View Full Code Here


        ArrayList<StreamEntityDTO> entities = new ArrayList<StreamEntityDTO>();

        for (int i = 0; i < ntids.length; i++)
        {
            StreamEntityDTO dto = new StreamEntityDTO();
            dto.setUniqueIdentifier(ntids[i]);
            dto.setType(EntityType.PERSON);
            entities.add(dto);
        }

        if (ntids.length == 0)
        {
View Full Code Here

    @Before
    public void setUp()
    {
        sut = new LikeTranslator(activityDAO);

        final StreamEntityDTO destination = context.mock(StreamEntityDTO.class, "destination");

        context.checking(new Expectations()
        {
            {
                allowing(activityDAO).execute(ACTIVITY_ID);
View Full Code Here

     * Tests translating.
     */
    @Test
    public void testTranslate()
    {
        StreamEntityDTO stream = new StreamEntityDTO();
        stream.setType(EntityType.PERSON);
        stream.setDestinationEntityId(4L);
        final ActivityDTO activity = new ActivityDTO();
        activity.setDestinationStream(stream);

        context.checking(new Expectations()
        {
View Full Code Here

     * Tests translating.
     */
    @Test
    public void testTranslateGroup()
    {
        StreamEntityDTO stream = new StreamEntityDTO();
        stream.setType(EntityType.GROUP);
        stream.setDestinationEntityId(4L);
        final ActivityDTO activity = new ActivityDTO();
        activity.setDestinationStream(stream);

        context.checking(new Expectations()
        {
View Full Code Here

    {
        transDef = new DefaultTransactionDefinition();
        transDef.setPropagationBehavior(DefaultTransactionDefinition.PROPAGATION_REQUIRED);
        transDef.setName("TestTransDef");

        destinationStream = new StreamEntityDTO();

        sut = new ShareVerbValidator(activityMapperMock, transMgr, groupMapperMock);

        testOriginalActivity = new ActivityDTO();
        testOriginalActivity.setVerb(ActivityVerb.SHARE);

        testOriginalActor = new StreamEntityDTO();
        testOriginalActor.setUniqueIdentifier(ORIGINAL_ACTOR_UNIQUE_ID);

        testOriginalActivity.setActor(testOriginalActor);

        testBaseObjectProperties = new HashMap<String, String>();
View Full Code Here

    public void testFailureValidate()
    {
        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.SHARE);

        StreamEntityDTO mismatchedOriginalActor = new StreamEntityDTO();
        mismatchedOriginalActor.setUniqueIdentifier("something");
        testActivity.setOriginalActor(mismatchedOriginalActor);

        HashMap<String, String> mismatchedObjProperties = new HashMap<String, String>();
        mismatchedObjProperties.put("originalActivityId", FAIL_ORIGINAL_ACTIVITY_ID.toString());
        testActivity.setBaseObjectProperties(mismatchedObjProperties);
View Full Code Here

        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.SHARE);
        testActivity.setOriginalActor(testOriginalActor);
        testActivity.setBaseObjectProperties(testBaseObjectProperties);

        StreamEntityDTO mismatchedOriginalActor = new StreamEntityDTO();
        mismatchedOriginalActor.setUniqueIdentifier("something");
        testActivity.setOriginalActor(mismatchedOriginalActor);

        final String testGroupId = "testGroup";

        final List<Long> activityIds = new ArrayList<Long>();
View Full Code Here

        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.SHARE);
        testActivity.setOriginalActor(testOriginalActor);
        testActivity.setBaseObjectProperties(testBaseObjectProperties);

        StreamEntityDTO mismatchedOriginalActor = new StreamEntityDTO();
        mismatchedOriginalActor.setUniqueIdentifier("something");
        testActivity.setOriginalActor(mismatchedOriginalActor);

        final List<String> groupIds = new ArrayList<String>();
        groupIds.add("testGroup");
View Full Code Here

     */
    public static ActivityDTO buildActivityDTO(final DestinationStreamTestState streamState, final boolean shareVerb,
            final CommentDTO inTestComment, final Long inDestinationId)
    {
        ActivityDTO currentActivity = new ActivityDTO();
        StreamEntityDTO destinationStream;
        switch (streamState)
        {
        case NULLSTREAM:
            currentActivity.setDestinationStream(null);
            break;
        case NULLIDENTIFIER:
            destinationStream = new StreamEntityDTO();
            currentActivity.setDestinationStream(destinationStream);
            break;
        case EMPTYIDENTIFIER:
            destinationStream = new StreamEntityDTO();
            destinationStream.setUniqueIdentifier("");
            destinationStream.setType(EntityType.PERSON);
            currentActivity.setDestinationStream(destinationStream);
            break;
        case INVALIDTYPE:
            destinationStream = new StreamEntityDTO();
            destinationStream.setUniqueIdentifier("destStream");
            destinationStream.setType(EntityType.APPLICATION);
            break;
        default:
            destinationStream = new StreamEntityDTO();
            destinationStream.setUniqueIdentifier("destStream");
            destinationStream.setType(EntityType.PERSON);
            destinationStream.setDestinationEntityId(inDestinationId);
            currentActivity.setDestinationStream(destinationStream);
            break;
        }
        if (shareVerb)
        {
View Full Code Here

TOP

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

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.