Package net.sf.redmine_mylyn.api.model.container

Examples of net.sf.redmine_mylyn.api.model.container.TimeEntries


      lst.add(buildAttachment(10, 2, 1153336047000l, "picture.jpg", 452, "b91e08d0cf966d5c6ff411bd8c4cc3a2", "image/jpeg", "kurze Beschreibung"));
     
      /* IssueRelations */
     
      /* TimeEntries + sum*/
      TimeEntries timeEntries = new TimeEntries();
      timeEntries.setNewAllowed(true);
      timeEntries.setViewAllowed(true);
      Field sum = timeEntries.getClass().getDeclaredField("sum");
      sum.setAccessible(true);
      sum.setFloat(timeEntries, 4.25f);
      issue.setTimeEntries(timeEntries);
      lst = getList(timeEntries);
      lst.add(buildTimeEntry(1, 4.25f, 9, 2, "2007-03-23", "My hours", buildCustomValue(5, 7, "1")));
View Full Code Here


    Attachments attachments = obj.getAttachments();
    assertEquals(0, attachments.getAll().size());
   
    //IssueRelations
   
    TimeEntries tEntrys = obj.getTimeEntries();
    assertEquals(154.25f, tEntrys.getSum(), 0.0);
    assertTrue(tEntrys.isNewAllowed());
    assertTrue(tEntrys.isViewAllowed());
    assertEquals(2, tEntrys.getAll().size());
    assertEquals(4.25, tEntrys.get(1).getHours(), 0.0);
    assertEquals(9, tEntrys.get(1).getActivityId());
    assertEquals(2, tEntrys.get(1).getUserId());
    assertEquals(REDMINE_DATE_FORMAT.parse("2007-03-23"), tEntrys.get(1).getSpentOn());
    assertEquals("My hours", tEntrys.get(1).getComments());
    //CF
  }
View Full Code Here

    assertNull(obj.getSubtasks());
    assertTrue(obj.isWatchersViewAllowed());
    assertTrue(obj.isWatchersAddAllowed());
    assertTrue(obj.isWatchersDeleteAllowed());
   
    TimeEntries tEntrys = obj.getTimeEntries();
    assertEquals(4.25f, tEntrys.getSum(), 0.0);
    assertEquals(1, tEntrys.getAll().size());
    assertEquals(4.25, tEntrys.get(1).getHours(), 0.0);
    assertEquals(9, tEntrys.get(1).getActivityId());
    assertEquals(2, tEntrys.get(1).getUserId());
    assertEquals(REDMINE_DATE_FORMAT.parse("2007-03-23"), tEntrys.get(1).getSpentOn());
    assertEquals("My hours", tEntrys.get(1).getComments());

    CustomValues cfs = tEntrys.get(1).getCustomValues();
    assertEquals(1, cfs.getAll().size());
    assertEquals(5, cfs.get(5).getId());
    assertEquals(2, cfs.get(5).getCustomFieldId());
    assertEquals("", cfs.get(5).getValue());
   
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.model.container.TimeEntries

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.