Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.Strategy


                influencingFactorsParts.get(
                    influencingFactorToRemove).dispose();
                influencingFactorsParts
                    .remove(influencingFactorToRemove);
              } 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)
View Full Code Here


public class UpdateStrategyDescriptionCommandTest extends EMFfitTestCase {

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

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

public class SetStrategyNameCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRun() {
    //setup
    Strategy strategy = issueCard.getStrategies().get(0);
    String newName = "new foo name";
   
    //run command
    new SetStrategyNameCommand(strategy, newName).runWithoutUnicaseCommand();
   
    //check
    assertEquals(newName, strategy.getName());
  }
View Full Code Here

public class DeleteStrategyCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRun() {
    //setup
    Strategy strategy = issueCard.getStrategies().get(0);
    int strategyCount = issueCard.getRelatedIssues().size();
   
    //run command
    new DeleteStrategyCommand(strategy).runWithoutUnicaseCommand();
   
View Full Code Here

    issueCard.getInfluencingFactors().add(iF1);
    issueCard.getInfluencingFactors().add(iF2);
    issueCard.getInfluencingFactors().add(iF3);
   
   
    Strategy strategy1 = EMFfitModelFactory.eINSTANCE.createStrategy();
    strategy1.setName("foo strategy 1");
    strategy1.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
   
    Strategy strategy2 = EMFfitModelFactory.eINSTANCE.createStrategy();
    strategy2.setName("foo strategy 2");
    strategy2.setDescription(HypertextHelpers.strToHypertext("I'm a description."));
   
    Strategy strategy3 = EMFfitModelFactory.eINSTANCE.createStrategy();

    issueCard.getStrategies().add(strategy1);
    issueCard.getStrategies().add(strategy2);
    issueCard.getStrategies().add(strategy3);
   
View Full Code Here

  /* (non-Javadoc)
   * @see emffit_commands.EMFfitCommand#doRun()
   */
  @Override
  protected void doRun() {
    Strategy newStrategy = EMFfitModelFactory.eINSTANCE.createStrategy();
    newStrategy.setName(name);
        //newStrategy.setDescription(EMFfitFactory.eINSTANCE.createHypertext());
    issueCard.getStrategies().add(newStrategy);

   
   
View Full Code Here

   */
  @Override
  protected void doRun() {
   
    for (int i = issueCard.getStrategies().size()-1; i >=0; i--) {
      Strategy strategy = issueCard.getStrategies().get(i);
      new DeleteStrategyCommand(strategy).runWithoutUnicaseCommand();
    }

  }
View Full Code Here

TOP

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

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.