Examples of StreamPopularHashTagsRequest


Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

    {
        context.checking(new Expectations()
        {
            {
                oneOf(actionContext).getParams();
                will(returnValue(new StreamPopularHashTagsRequest(ScopeType.PERSON, "accountid")));
            }
        });

        sut.authorize(actionContext);
        context.assertIsSatisfied();
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

            {
                oneOf(group).isPublic();
                will(returnValue(true));

                oneOf(actionContext).getParams();
                will(returnValue(new StreamPopularHashTagsRequest(ScopeType.GROUP, "shortname")));

                oneOf(groupsMapper).fetchUniqueResult("shortname");
                will(returnValue(group));
            }
        });
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

                oneOf(group).getId();
                will(returnValue(groupId));

                oneOf(actionContext).getParams();
                will(returnValue(new StreamPopularHashTagsRequest(ScopeType.GROUP, "shortname")));

                oneOf(groupsMapper).fetchUniqueResult("shortname");
                will(returnValue(group));

                oneOf(actionContext).getPrincipal();
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

                oneOf(group).getId();
                will(returnValue(groupId));

                oneOf(actionContext).getParams();
                will(returnValue(new StreamPopularHashTagsRequest(ScopeType.GROUP, "shortname")));

                oneOf(groupsMapper).fetchUniqueResult("shortname");
                will(returnValue(group));

                allowing(actionContext).getPrincipal();
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

    public final void executeWithNoTags()
    {
        final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> popularHashTagsMapper = context
                .mock(DomainMapper.class);

        final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest();
        final StreamPopularHashTagsReportDTO response = new StreamPopularHashTagsReportDTO(null, null);
        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);

        GetStreamPopularHashTagsExecution sut = new GetStreamPopularHashTagsExecution(popularHashTagsMapper);
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

    public final void executeWithTags()
    {
        final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> popularHashTagsMapper = context
                .mock(DomainMapper.class);

        final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest();
        final StreamPopularHashTagsReportDTO response = new StreamPopularHashTagsReportDTO(null, null);
        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final ArrayList<String> hashTags = new ArrayList<String>();
        hashTags.add("#foo");
        hashTags.add("#bar");
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

     * Test transform.
     */
    @Test
    public void testTransform()
    {
        assertEquals("GROUP-foo", sut.transform(new StreamPopularHashTagsRequest(ScopeType.GROUP, "foo")));
        assertEquals("PERSON-foo", sut.transform(new StreamPopularHashTagsRequest(ScopeType.PERSON, "foo")));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

     * Test execute when the hashtags are not found in cache.
     */
    @Test
    public void testExecuteNotInCache()
    {
        final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest(ScopeType.PERSON, "foobar");

        context.checking(new Expectations()
        {
            {
                oneOf(popularHashTagsMapper).execute(request);
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

     * Test execute when the hashtags are found in cache and are current.
     */
    @Test
    public void testExecuteFoundInCacheAndCurrent()
    {
        final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest(ScopeType.PERSON, "foobar");
        ArrayList<String> hashTags = new ArrayList<String>();
        hashTags.add("#foo");
        hashTags.add("#bar");
        Calendar cal = Calendar.getInstance();
        final StreamPopularHashTagsReportDTO response = new StreamPopularHashTagsReportDTO(hashTags, cal.getTime());
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.StreamPopularHashTagsRequest

     * Test execute when the hashtags are found in cache and expired.
     */
    @Test
    public void testExecuteFoundInCacheAndExpired()
    {
        final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest(ScopeType.PERSON, "foobar");
        ArrayList<String> hashTags = new ArrayList<String>();
        Calendar cal = Calendar.getInstance();
        final int twentyDaysAgo = -480;
        cal.add(Calendar.HOUR, twentyDaysAgo);
        final StreamPopularHashTagsReportDTO response = new StreamPopularHashTagsReportDTO(hashTags, cal.getTime());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.