Examples of Defect


Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Defect

    assertEquals(0, updated.getEvents().size());
  }
 
  @Test
  public void testProjectChangeIgnored() throws WPISuiteException {
    Defect existingDefectCopy = new Defect(1, "An existing defect", "", existingUser);
    existingDefectCopy.setProject(otherProject);
    Defect updated = manager.update(defaultSession, existingDefectCopy.toJSON());
    assertEquals(0, updated.getEvents().size());
    assertSame(testProject, updated.getProject());
  }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Defect

 
  @Before
  public void setUp() {
    mapper = new ModelMapper();
    user = new User("a", "a", "a", 1);
    a = new Defect(1, "a", "a", user);
    b = new Defect(2, "b", "b", null);
  }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Defect

   *
   * TODO: Do some basic input verification
   * @return the model represented by this view
   */
  public Defect getEditedModel() {
    Defect defect = new Defect();
    defect.setId(model.getId());
    defect.setTitle(txtTitle.getText());
    defect.setDescription(txtDescription.getText());
    defect.setStatus(DefectStatus.valueOf((String) cmbStatus.getSelectedItem()));
    if (!(txtAssignee.getText().equals(""))) {
      defect.setAssignee(new User("", txtAssignee.getText(), "", -1));
    }
    if (!(txtCreator.getText().equals(""))) {
      defect.setCreator(new User("", txtCreator.getText(), "", -1));
    }
    HashSet<Tag> tags = new HashSet<Tag>();
    for (int i = 0; i < tagPanel.lmTags.getSize(); i++) {
      tags.add(new Tag((String)tagPanel.lmTags.get(i)));
    }
    defect.setTags(tags);
   
    return defect;
  }
View Full Code Here

Examples of net.sourceforge.processdash.log.defects.Defect

    }

    public void save() {
      refreshFixTimeFromStopwatch();

      Defect d = new Defect();
      d.date = fix_date.getDate();
      if (d.date == null)
          d.date = date;
      d.number = defectNumber;
      d.defect_type = (String)defect_type.getSelectedItem();
View Full Code Here

Examples of net.sourceforge.processdash.log.defects.Defect

        public void caseElement(Element e, List k) {
            if (DEFECT_TAG.equals(e.getTagName())) {
                String path = e.getAttribute(PATH_ATTR);

                Defect d = new Defect();
                d.date = XMLUtils.getXMLDate(e, DATE_ATTR);
                d.number = ""; // e.getAttribute(NUM_ATTR);
                d.defect_type = e.getAttribute(DEFECT_TYPE_ATTR);
                d.phase_injected = e.getAttribute(INJECTED_ATTR);
                d.phase_removed = e.getAttribute(REMOVED_ATTR);
View Full Code Here

Examples of net.sourceforge.processdash.log.defects.Defect

        int addedCount = 0;
        int updatedCount = 0;
        int unchangedCount = 0;
       
        for (Iterator i = defects.iterator(); i.hasNext();) {
            Defect newDefect = (Defect) i.next();
            Defect oldDefect = defectLog.getDefect(newDefect.number);
            if (oldDefect == null) {
                addedCount++;
                defectLog.writeDefect(newDefect);
            } else {
                Defect originalDefect = (Defect) oldDefect.clone();
                oldDefect.defect_type = merge(oldDefect.defect_type, newDefect.defect_type);
                oldDefect.phase_injected = merge(oldDefect.phase_injected, newDefect.phase_injected);
                oldDefect.phase_removed = merge(oldDefect.phase_removed, newDefect.phase_removed);
                oldDefect.description = merge(oldDefect.description, newDefect.description);
                oldDefect.fix_time = merge(oldDefect.fix_time, newDefect.fix_time);
                oldDefect.fix_defect = merge(oldDefect.fix_defect, newDefect.fix_defect);
                if (originalDefect.equals(oldDefect)) {
                    unchangedCount++;
                } else {
                    updatedCount++;
                    defectLog.writeDefect(oldDefect);
                }
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.