Package org.eurekastreams.server.persistence.mappers.requests

Examples of org.eurekastreams.server.persistence.mappers.requests.CurrentDateInMinutesRequest


     * < 11, so this should only update 1 feed, feed ID 1.
     */
    @Test
    public void testExecuteAtTime1011()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1011);
        sut.execute(request);

        Query q = getEntityManager().createQuery("FROM Feed");
        List<Feed> results = q.getResultList();

View Full Code Here


     * but it's plugin has an update time of 30. Therefore this should update 3 feeds.
     */
    @Test
    public void testExecuteAtTime1031()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1031);
        sut.execute(request);

        getEntityManager().flush();
        Query q = getEntityManager().createQuery("FROM Feed");

View Full Code Here

     * All of the feeds have over under 60 min refresh times except the 1 pending Four results should be updated.
     */
    @Test
    public void testExecuteAtTime1061()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1061);
        sut.execute(request);

        getEntityManager().flush();
        Query q = getEntityManager().createQuery("FROM Feed");

View Full Code Here

     * None of the feeds have refresh times of under 5 min. No updates.
     */
    @Test
    public void testExecuteAtTime1005()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1005);
        sut.execute(request);

        getEntityManager().flush();
        Query q = getEntityManager().createQuery("FROM Feed");

View Full Code Here

     * None of the feeds have refresh times of under 5 min. No results.
     */
    @Test
    public void testExecuteAtTime1005()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1005);
        List<Feed> results = sut.execute(request);

        assertTrue(results.size() == 0);
    }
View Full Code Here

     * < 11, so this should only return 1 feed, feed ID 1.
     */
    @Test
    public void testExecuteAtTime1011()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1011);
        List<Feed> results = sut.execute(request);

        assertTrue(results.size() == 2);
        assertTrue(results.get(0).getId() == 1L);
        assertTrue(results.get(1).getId() == 2L);
View Full Code Here

     * but it's plugin has an update time of 30. Therefore this should return 3 feeds.
     */
    @Test
    public void testExecuteAtTime1031()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1031);
        List<Feed> results = sut.execute(request);

        assertTrue(results.size() == 4);
        assertTrue(results.get(0).getId() == 1L);
        assertTrue(results.get(1).getId() == 2L);
View Full Code Here

     * All of the feeds have over under 60 min refresh times except the 1 pending Four results should be returned.
     */
    @Test
    public void testExecuteAtTime1061()
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1061);
        List<Feed> results = sut.execute(request);

        assertTrue(results.size() == 5);
        assertTrue(results.get(0).getId() == 1L);
        assertTrue(results.get(1).getId() == 2L);
View Full Code Here

     */

    @Override
    public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext)
    {
        CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(new Date().getTime()
                / (MILLISECONDSINMINUTE));

        List<Feed> feeds = getFeedsMapper.execute(request);
        List<Long> feedIds = new ArrayList<Long>();
        for (Feed feed : feeds)
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.CurrentDateInMinutesRequest

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.