Package org.apache.rave.portal.model

Examples of org.apache.rave.portal.model.ActivityStreamsMediaLink


        assertThat(entry.getHeight(), is(equalTo(activityStreamsMediaLink.getHeight())));
        assertThat(entry.getDuration(), is(equalTo(activityStreamsMediaLink.getDuration())));
        assertThat(entry.getWidth(), is(equalTo(activityStreamsMediaLink.getWidth())));
        assertThat(entry.getUrl(), is(equalTo(activityStreamsMediaLink.getUrl())));

        ActivityStreamsMediaLink reconverted = conversionUtilTest.convert(entry)    ;

        assertThat(entry.getHeight(), is(equalTo(reconverted.getHeight())));
        assertThat(entry.getDuration(), is(equalTo(reconverted.getDuration())));
        assertThat(entry.getWidth(), is(equalTo(reconverted.getWidth())));
        assertThat(entry.getUrl(), is(equalTo(reconverted.getUrl())));


    }
View Full Code Here


        assertThat(converter.convert(template), is(sameInstance(template)));
    }

    @Test
    public void nullConversion() {
        ActivityStreamsMediaLink template = null;
        assertThat(converter.convert(template), is(nullValue()));
    }
View Full Code Here

    }


    @Test
    public void convertValid() {
        ActivityStreamsMediaLink template = new ActivityStreamsMediaLinkImpl();
        template.setDuration(1);
        template.setHeight(1);
        template.setUrl("TEST_C");
        template.setWidth(1);



        JpaActivityStreamsMediaLink jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaActivityStreamsMediaLink.class)));
        assertThat(jpaTemplate.getDuration(), is(equalTo(template.getDuration())));
        assertThat(jpaTemplate.getHeight(), is(equalTo(template.getHeight())));
        assertThat(jpaTemplate.getWidth(), is(equalTo(template.getWidth())));
        assertThat(jpaTemplate.getUrl(), is(equalTo(template.getUrl())));


    }
View Full Code Here

    }

    public ActivityStreamsMediaLink convert (MediaLink icon) {
        if(icon == null) return null;
        ActivityStreamsMediaLink entity = new ActivityStreamsMediaLinkImpl();
        entity.setDuration(icon.getDuration());
        entity.setHeight(icon.getHeight());
        entity.setOpenSocial(convert(icon.getOpenSocial()));
        entity.setUrl(icon.getUrl());
        entity.setWidth(icon.getWidth());
        return entity;
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.ActivityStreamsMediaLink

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.