Package org.joda.time

Examples of org.joda.time.LocalDate


  public void testMerge_notModifyParams() throws Exception {
    long duration1 = 34;
    long duration2 = 2398;
    String fileId = "124";
    String handleId = "abc";
    LocalDate date = new LocalDate(1999, 1, 1);
   
    TaskIdType id1 = new TaskIdType();
    id1.setHandleId(handleId);
    id1.setCreationDate(DatatypeUtil.toXmlDate(date));
   
View Full Code Here


  }

  @Override
  protected TaskFileEventType createTargetType() {
    TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDate(new LocalDate()));
    id.setHandleId("aTaskId");
   
    TaskFileEventType type = new TaskFileEventType();
    type.setDuration(129);
    type.setFilePath("helloWorld");
View Full Code Here

  }

  @Override
  protected TaskFileEventType createTargetTypeDiff() {
    TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDate(new LocalDate(1999, 1, 1)));
    id.setHandleId("1.2.3.4.5.6.7");
   
    TaskFileEventType type = new TaskFileEventType();
    type.setDuration(12119);
    type.setFilePath("0.9.8.7.6.");
View Full Code Here

    assertSame(getCategories(t), accessor.getCategories(t));
  }

  @Test
  public void getDataShouldNotReturnTheDataOutsideOfTheDates() throws Exception {
    LocalDate date = new LocalDate();
    writeData(date);
    Collection<T> data = accessor.getData(date.plusDays(1), date.plusDays(2));
    assertThat(data.size(), is(0));
  }
View Full Code Here

    assertThat(data.size(), is(0));
  }

  @Test
  public void getDataShouldReturnAnEmptyCollectionIfNoData() {
    LocalDate start = new LocalDate().plusDays(100);
    LocalDate end = start.plusDays(2);
    assertThat(accessor.getData(start, end), is(notNullValue()));
    assertThat(accessor.getData(start, end).isEmpty(), is(true));
  }
View Full Code Here

    assertThat(accessor.getData(start, end).isEmpty(), is(true));
  }

  @Test
  public void getDataShouldReturnTheCorrectDataForMultipleDays() {
    LocalDate start = new LocalDate(2010, 1, 1);
    LocalDate end = new LocalDate(2010, 1, 3);
    E e1 = createElement();
    E e2 = createElement();

    S list1 = createCategory();
    list1.setDate(toXmlDate(start));
View Full Code Here

  }

  @Test
  public void getDataShouldReturnTheCorrectDataForTheSameDate()
      throws Exception {
    LocalDate date = new LocalDate();
    E element = createElement();
    File file = accessor.getDataStore().getDataFile(date);
    writeData(element, date, file);

    Collection<T> data = accessor.getData(date, date);
View Full Code Here

    assertValues(element, date, ws, data.iterator().next());
  }

  @Test
  public void getDataShouldReturnTheCorrectDataStoredForAnotherWorkspace() {
    LocalDate date = new LocalDate().minusDays(1);
    E element = createElement();

    // Go to the root of the storage folder for current workspace:
    File file = accessor.getDataStore().getDataFile(date).getParentFile();
    // Go to the parent folder of the storage folder for current workspace:
View Full Code Here

    assertValues(element, date, ws, data.iterator().next());
  }

  @Test(expected = NullPointerException.class)
  public void getDataShouldThrowNullPointerExceptionIfEndDateIsNull() {
    accessor.getData(new LocalDate(), null);
  }
View Full Code Here

    accessor.getData(new LocalDate(), null);
  }

  @Test(expected = NullPointerException.class)
  public void getDataShouldThrowNullPointerExceptionIfStartDateIsNull() {
    accessor.getData(null, new LocalDate());
  }
View Full Code Here

TOP

Related Classes of org.joda.time.LocalDate

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.