Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.InfluencingFactor


              }
              break;

            case Notification.REMOVE:
              if (oldValue instanceof InfluencingFactor) {
                InfluencingFactor influencingFactorToRemove = (InfluencingFactor) oldValue;
                influencingFactorsParts.get(
                    influencingFactorToRemove).dispose();
                influencingFactorsParts
                    .remove(influencingFactorToRemove);
              } else if (oldValue instanceof Strategy) {
View Full Code Here


public class AddIssueCardInluencingFactorCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    InfluencingFactor newInfluencingFactor = EMFfitModelFactory.eINSTANCE.createInfluencingFactor();
    new AddIssueCardInluencingFactorCommand(issueCard, newInfluencingFactor).runWithoutUnicaseCommand();
    assertEquals(4, issueCard.getInfluencingFactors().size());
    assertNotNull(issueCard.getInfluencingFactors().get(3).getDescription());
  }
View Full Code Here

  @Test
  public void testDoRun() {
   
    //setup
    InfluencingFactor influencingFactor = issueCard.getInfluencingFactors().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 UpdateInfluencingFactorDescriptionCommand(influencingFactor, newDescription).runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, influencingFactor.getDescription().getContent().size());
    assertEquals(newDescriptionContent, ((Term)influencingFactor.getDescription().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

 
  @Test
  public void testDoRunForNullDescription() {
   
    //setup
    InfluencingFactor influencingFactor = issueCard.getInfluencingFactors().get(0);
    influencingFactor.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 UpdateInfluencingFactorDescriptionCommand(influencingFactor, newDescription).runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, influencingFactor.getDescription().getContent().size());
    assertEquals(newDescriptionContent, ((Term)influencingFactor.getDescription().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

    issueCard = EMFfitModelFactory.eINSTANCE.createIssueCard();
    issueCard.setName("foo issue 1");
    issueCard.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
    issueCard.setSolution(HypertextHelpers.strToHypertext("I'm a solution."));
   
    InfluencingFactor iF1 = EMFfitModelFactory.eINSTANCE.createInfluencingFactor();
    iF1.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
    iF1.setFactor(factor1);
   
    InfluencingFactor iF2 = EMFfitModelFactory.eINSTANCE.createInfluencingFactor();
    iF2.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
    iF2.setFactor(factor2);
   
    InfluencingFactor iF3 = EMFfitModelFactory.eINSTANCE.createInfluencingFactor();
   
    issueCard.getInfluencingFactors().add(iF1);
    issueCard.getInfluencingFactors().add(iF2);
    issueCard.getInfluencingFactors().add(iF3);
   
View Full Code Here

  @Override
  protected void doRun() {
    if (factor != null && ModelUtil.getProject(factor) == null){
        ModelUtil.getProject(issueCard).addModelElement(factor);
    }
    InfluencingFactor newInfluencingFactor = EMFfitModelFactory.eINSTANCE.createInfluencingFactor();
    newInfluencingFactor.setFactor(factor);
  //  newInfluencingFactor.setDescription(EMFfitFactory.eINSTANCE.createHypertext());
    issueCard.getInfluencingFactors().add( newInfluencingFactor );
  }
View Full Code Here

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

public class SetInfluencingFactorFactorCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRun() {
    //setup
    InfluencingFactor influencingFactor = issueCard.getInfluencingFactors().get(0);
    Factor newFactor = EMFfitModelFactory.eINSTANCE.createFactor();
   
    //run command
    new SetInfluencingFactorFactorCommand(influencingFactor, newFactor).runWithoutUnicaseCommand();
   
    //check
    assertEquals(newFactor, influencingFactor.getFactor());
  }
View Full Code Here

public class DeleteInfluencingFactorCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    //setup
    InfluencingFactor influencingFactor = issueCard.getInfluencingFactors().get(0);
    int influencingFactorsCount = issueCard.getInfluencingFactors().size();
   
    //run command
    new DeleteInfluencingFactorCommand(influencingFactor).runWithoutUnicaseCommand();
   
View Full Code Here

TOP

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

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.