Examples of plusHours()


Examples of org.joda.time.DateTime.plusHours()

        activityStreamService.addActivity(activity);
        activity = new ActivityImpl();
        activity.setActor(benderActivityObject);
        activity.setObject(zappActivityObject);
        activity.setVerb(CIRCLE_RELATIONSHIP_KIND_GROUP);
        activity.setPublishedDate(now.plusHours(3).toDate());
        activityStreamService.addActivity(activity);
    }

    protected void initializeDummyDocumentRelatedActivities() {
        DateTime now = new DateTime();
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        activityStreamService.addActivity(activity);
        activity = new ActivityImpl();
        activity.setActor(benderActivityObject);
        activity.setObject("doc:default:docId1");
        activity.setVerb(DOCUMENT_UPDATED);
        activity.setPublishedDate(now.plusHours(1).toDate());
        activityStreamService.addActivity(activity);
        activity = new ActivityImpl();
        activity.setActor(benderActivityObject);
        activity.setObject("doc:default:docId1");
        activity.setVerb(DOCUMENT_REMOVED);
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        activityStreamService.addActivity(activity);
        activity = new ActivityImpl();
        activity.setActor(benderActivityObject);
        activity.setObject("doc:default:docId1");
        activity.setVerb(DOCUMENT_REMOVED);
        activity.setPublishedDate(now.plusHours(4).toDate());
        activityStreamService.addActivity(activity);
    }

    protected void createDocumentsWithBender() throws ClientException {
        DocumentModel workspacesDocument = session.getDocument(new PathRef(
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

      assertEquals("Count at index " + i + " should be " + expect, expect, counts[i]);
    }

    // Query a 24 hour period in minutes
    now = start.plusHours(5).withMinuteOfHour(0);
    queryInterval = new Interval(now, now.plusHours(24));

    aggregateCount = aggregateCounterRepository.getCounts(counterName, queryInterval, AggregateCountResolution.minute);
    counts = aggregateCount.getCounts();
    // Add 'now.plusHours(24)' minute time to the count
    assertEquals((24 * 60) + 1, counts.length);
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

   
    @Test
    public void test() throws Exception {
        DateTime monthBegin = new DateTime(DateTimeZone.UTC).withMillisOfDay(0).withDayOfMonth(1);
        List<Event> events = ImmutableList.of(
                new Event(monthBegin.plusHours(1).plusMinutes(1), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(2), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(3), "frank"),
                new Event(monthBegin.plusHours(5).plusMinutes(2), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(10), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(5), "frank"),
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

    @Test
    public void test() throws Exception {
        DateTime monthBegin = new DateTime(DateTimeZone.UTC).withMillisOfDay(0).withDayOfMonth(1);
        List<Event> events = ImmutableList.of(
                new Event(monthBegin.plusHours(1).plusMinutes(1), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(2), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(3), "frank"),
                new Event(monthBegin.plusHours(5).plusMinutes(2), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(10), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(5), "frank"),
                new Event(monthBegin.minusHours(1).plusMinutes(30), "frank"));
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

    public void test() throws Exception {
        DateTime monthBegin = new DateTime(DateTimeZone.UTC).withMillisOfDay(0).withDayOfMonth(1);
        List<Event> events = ImmutableList.of(
                new Event(monthBegin.plusHours(1).plusMinutes(1), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(2), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(3), "frank"),
                new Event(monthBegin.plusHours(5).plusMinutes(2), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(10), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(5), "frank"),
                new Event(monthBegin.minusHours(1).plusMinutes(30), "frank"));
       
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        DateTime monthBegin = new DateTime(DateTimeZone.UTC).withMillisOfDay(0).withDayOfMonth(1);
        List<Event> events = ImmutableList.of(
                new Event(monthBegin.plusHours(1).plusMinutes(1), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(2), "bob"),
                new Event(monthBegin.plusHours(1).plusMinutes(3), "frank"),
                new Event(monthBegin.plusHours(5).plusMinutes(2), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(10), "bob"),
                new Event(monthBegin.minusHours(1).plusMinutes(5), "frank"),
                new Event(monthBegin.minusHours(1).plusMinutes(30), "frank"));
       
        CubeWrapper cubeWrapper = new CubeWrapper();
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

       
        for(Event event: events) {
            cubeWrapper.put(event);
        }
       
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForHour(monthBegin.plusHours(1)));
        Assert.assertEquals(1L, cubeWrapper.getUniqueUsersForHour(monthBegin.plusHours(5)));
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForHour(monthBegin.minusHours(1)));
       
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForDay(monthBegin));
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForDay(monthBegin.minusDays(1)));
View Full Code Here

Examples of org.joda.time.DateTime.plusHours()

        for(Event event: events) {
            cubeWrapper.put(event);
        }
       
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForHour(monthBegin.plusHours(1)));
        Assert.assertEquals(1L, cubeWrapper.getUniqueUsersForHour(monthBegin.plusHours(5)));
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForHour(monthBegin.minusHours(1)));
       
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForDay(monthBegin));
        Assert.assertEquals(2L, cubeWrapper.getUniqueUsersForDay(monthBegin.minusDays(1)));
       
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.