Package org.eurekastreams.server.action.request

Examples of org.eurekastreams.server.action.request.SharedResourceRequest


     * Text execute, expecting no results.
     */
    @Test
    public void testExecuteWithNoResults()
    {
        List<Long> peopleIds = sut.execute(new SharedResourceRequest("http://foo.foo.com/foo.html", null));
        assertEquals(0, peopleIds.size());
    }
View Full Code Here


     * Text execute with a non existent resource.
     */
    @Test
    public void testExecuteWithBadResource()
    {
        List<Long> peopleIds = sut.execute(new SharedResourceRequest("http://blah.com", null));
        assertEquals(0, peopleIds.size());
    }
View Full Code Here

                                .getResponse().getShareCount(), event.getResponse().getSharersSample(), event
                                .getResponse().isLiked()));
                    }
                });
        LikeResourceModel.getInstance().fetch(
                new SharedResourceRequest(resourceUrl, Session.getInstance().getCurrentPerson().getEntityId()), false);

    }
View Full Code Here

    public void testExecuteWithResults()
    {
        final long personId1 = 98;
        final long personId2 = 42;
        getEntityManager().clear();
        List<Long> peopleIds = sut.execute(new SharedResourceRequest("http://foo.com/foo.html", null));
        assertEquals(2, peopleIds.size());
        assertTrue(peopleIds.contains(personId1));
        assertTrue(peopleIds.contains(personId2));
    }
View Full Code Here

     * Test execute, expecting no results.
     */
    @Test
    public void testExecuteWithNoResults()
    {
        List<Long> peopleIds = sut.execute(new SharedResourceRequest("http://foo.foo.com/foo.html", null));
        assertEquals(0, peopleIds.size());
    }
View Full Code Here

     * Test execute, with bad shared resource.
     */
    @Test
    public void testExecuteWithBadSharedResource()
    {
        assertEquals(0, sut.execute(new SharedResourceRequest("http://blah.com", null)).size());
    }
View Full Code Here

        String url = "http://FFFFFF.com/foo.html";
        String urlLower = url.toLowerCase();
        FindOrInsertSharedResourceByUniqueKeyDbMapper sut = new FindOrInsertSharedResourceByUniqueKeyDbMapper();
        sut.setEntityManager(getEntityManager());

        SharedResource sr = sut.execute(new SharedResourceRequest(url, null));
        assertNotNull(sr);
        assertNotNull(sr.getStreamScope());
        assertEquals(urlLower, sr.getUniqueKey());
        assertEquals(urlLower, sr.getStreamScope().getUniqueKey());
        assertTrue(sr.getId() > 0);
View Full Code Here

    public void testExecuteWithBadInput()
    {
        FindOrInsertSharedResourceByUniqueKeyDbMapper sut = new FindOrInsertSharedResourceByUniqueKeyDbMapper();
        sut.setEntityManager(getEntityManager());

        assertNull(sut.execute(new SharedResourceRequest(-1L, null)));
    }
View Full Code Here

    {
        final long scopeId = 101L;
        FindOrInsertSharedResourceByUniqueKeyDbMapper sut = new FindOrInsertSharedResourceByUniqueKeyDbMapper();
        sut.setEntityManager(getEntityManager());

        SharedResource sr = sut.execute(new SharedResourceRequest("http://foo.com/foo.html", null));
        assertNotNull(sr);
        assertEquals(scopeId, sr.getStreamScope().getId());
        assertEquals(5L, sr.getId());
    }
View Full Code Here

    {
        final long scopeId = 101L;
        FindOrInsertSharedResourceByUniqueKeyDbMapper sut = new FindOrInsertSharedResourceByUniqueKeyDbMapper();
        sut.setEntityManager(getEntityManager());

        SharedResource sr = sut.execute(new SharedResourceRequest("http://FOO.com/foo.html", null));
        assertEquals(scopeId, sr.getStreamScope().getId());
        assertNotNull(sr);
        assertEquals(5L, sr.getId());
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.SharedResourceRequest

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.