Package edu.wpi.cs.wpisuitetng.modules.defecttracker.models

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


 
  @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

   *
   * 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

TOP

Related Classes of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Defect

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.