Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.RelatedIssue


              } else if (oldValue instanceof Strategy) {
                Strategy strategyToRemove = (Strategy) oldValue;
                strategiesParts.get(strategyToRemove).dispose();
                strategiesParts.remove(strategyToRemove);
              } else if (oldValue instanceof RelatedIssue) {
                RelatedIssue relatedIssueToRemove = (RelatedIssue) oldValue;
                relatedIssuesParts.get(relatedIssueToRemove)
                    .dispose();
                relatedIssuesParts.remove(relatedIssueToRemove);
              }
              break;
View Full Code Here


  @Test
  public void testDoRun() {
   
    //setup
    RelatedIssue relatedIssue = issueCard.getRelatedIssues().get(0);

   
    Hypertext newDescription = EMFfitModelFactory.eINSTANCE.createHypertext();

   
    String newDescriptionContent = "new foo";
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(newDescriptionContent);
    newDescription.getContent().add(term);
   
    //run command
    new UpdateRelatedIssueDescriptionCommand(relatedIssue, newDescription).runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, relatedIssue.getDescription().getContent().size());
    assertEquals(newDescriptionContent, ((Term)relatedIssue.getDescription().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

public class AddIssueCardRelatedIssueCardCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    RelatedIssue newRelatedIssue= EMFfitModelFactory.eINSTANCE.createRelatedIssue();
    new AddIssueCardRelatedIssueCardCommand(issueCard, newRelatedIssue).runWithoutUnicaseCommand();
    assertEquals(4, issueCard.getRelatedIssues().size());
    assertNotNull(issueCard.getRelatedIssues().get(3).getDescription());
  }
View Full Code Here

  }
 
  @Test
  public void testDoRunForNullDescription() {
    //setup
    RelatedIssue relatedIssue = issueCard.getRelatedIssues().get(0);
    relatedIssue.setDescription(null);
   
    Hypertext newDescription = EMFfitModelFactory.eINSTANCE.createHypertext();

   
    String newDescriptionContent = "new foo";
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(newDescriptionContent);
    newDescription.getContent().add(term);
   
    //run command
    new UpdateRelatedIssueDescriptionCommand(relatedIssue, newDescription).runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, relatedIssue.getDescription().getContent().size());
    assertEquals(newDescriptionContent, ((Term)relatedIssue.getDescription().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

    issueCard.getStrategies().add(strategy1);
    issueCard.getStrategies().add(strategy2);
    issueCard.getStrategies().add(strategy3);
   
   
    RelatedIssue ri1 = EMFfitModelFactory.eINSTANCE.createRelatedIssue();
    ri1.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
    ri1.setIssue(factor4);
   
    RelatedIssue ri2 = EMFfitModelFactory.eINSTANCE.createRelatedIssue();
    ri2.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
    ri2.setIssue(factor3);
   
    RelatedIssue ri3 = EMFfitModelFactory.eINSTANCE.createRelatedIssue();
   
    issueCard.getRelatedIssues().add(ri1);
    issueCard.getRelatedIssues().add(ri2);
    issueCard.getRelatedIssues().add(ri3);
   
View Full Code Here

public class DeleteRelatedIssueCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    //setup
    RelatedIssue relatedIssue = issueCard.getRelatedIssues().get(0);
    int relatedIssuesCount = issueCard.getRelatedIssues().size();
   
    //run command
    new DeleteRelatedIssueCommand(relatedIssue).runWithoutUnicaseCommand();
   
View Full Code Here

public class SetRelatedIssueIssueCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    //setup
    RelatedIssue relatedIssue = issueCard.getRelatedIssues().get(0);
    Factor newFactor = EMFfitModelFactory.eINSTANCE.createFactor();
   
    //run command
    new SetRelatedIssueIssueCommand(relatedIssue, newFactor).runWithoutUnicaseCommand();
   
    //check
    assertEquals(newFactor, relatedIssue.getIssue());
  }
View Full Code Here

   * @see emffit_commands.EMFfitCommand#doRun()
   */
  @Override
  protected void doRun() {
    for (int i = issueCard.getRelatedIssues().size()-1; i >=0; i--) {
      RelatedIssue relatedIssue = issueCard.getRelatedIssues().get(i);
      new DeleteRelatedIssueCommand(relatedIssue).runWithoutUnicaseCommand();
    }
  }
View Full Code Here

  protected void doRun() {
    if (issue != null && ModelUtil.getProject(issue) == null){
        ModelUtil.getProject(issueCard).addModelElement(issue);
    }

    RelatedIssue newRelatedIssue = EMFfitModelFactory.eINSTANCE.createRelatedIssue();
    newRelatedIssue.setIssue(issue);
    //newRelatedIssue.setDescription(EMFfitFactory.eINSTANCE.createHypertext());
    issueCard.getRelatedIssues().add(newRelatedIssue);
  }
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.EMFfitModel.RelatedIssue

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.