Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.Factor


public class SetFactorPriorityCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRun() {
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor1st = (Factor) fc1st.getChildren().get(1);
    new SetFactorPriorityCommand(factor1st,"3").runWithoutUnicaseCommand();
    assertEquals("3", factor1st.getPriority());
  }
View Full Code Here


 
  @Test
  public void testDoRunForFactor() {
    //setup
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor12 = (Factor) fc1st.getChildren().get(1);
   
    //run command
    new NewFTEntryCategoryCommand(factor12, "new foo subcategory").runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, factor12.getChildren().size());
    FactorCategory newFactorCategory =  (FactorCategory) factor12.getChildren().get(0);
    assertEquals("new foo subcategory", newFactorCategory.getName());
    assertEquals("O1.2.1", newFactorCategory.getNumbering());
  }
View Full Code Here

public class SetFactorNameCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRun() {
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor1st = (Factor) fc1st.getChildren().get(1);
    new SetFactorNameCommand(factor1st,"new name for foo factor").runWithoutUnicaseCommand();
    assertEquals("new name for foo factor", factor1st.getName());
  }
View Full Code Here

 
  @Test
  public void testDoRunForFactor() {
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor1st = (Factor) fc1st.getChildren().get(1);

   
    new SetFTEntryNumberingCommand(factor1st,"X1.2.3").runWithoutUnicaseCommand();
    assertEquals("X1.2.3", factor1st.getNumbering());

  }
View Full Code Here

    Hypertext newFlexibility = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(content);
    newFlexibility.getContent().add(term);
   
    Factor factor = (Factor)((FactorCategory)factorTable.getEntries().get(1)).getChildren().get(0);
   
    //run command
    new UpdateFactorFlexibilityCommand(factor,newFlexibility ).runWithoutUnicaseCommand();
   
    //check results
    assertEquals(1, factor.getFlexibility().getContent().size());
    assertEquals(content, ((Term)factor.getFlexibility().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

    Hypertext newFlexibility = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(content);
    newFlexibility.getContent().add(term);
   
    Factor factor = (Factor)((FactorCategory)factorTable.getEntries().get(1)).getChildren().get(0);
    factor.setFlexibility(null);
   
    //run command
    new UpdateFactorFlexibilityCommand(factor,newFlexibility ).runWithoutUnicaseCommand();
   
    //check results
    assertEquals(1, factor.getFlexibility().getContent().size());
    assertEquals(content, ((Term)factor.getFlexibility().getContent().get(0)).getVisibleContent());
  }
View Full Code Here

    //run command
    new NewFTEntryFactorCommand(fc1st, "new foo factor", "2").runWithoutUnicaseCommand();
   
    //check 
    assertEquals(5, fc1st.getChildren().size());
    Factor newFactor = (Factor) fc1st.getChildren().get(4);
    assertEquals("new foo factor", newFactor.getName());
    assertEquals("2", newFactor.getPriority());
    assertEquals("O1.5", newFactor.getNumbering());
    assertNotNull(newFactor.getDescription());
    assertNotNull(newFactor.getFlexibility());
    assertNotNull(newFactor.getChangeability());
    assertNotNull(newFactor.getInfluence());
  }
View Full Code Here

 
  @Test
  public void testDoRunForFactor() {
    //setup
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor12 = (Factor) fc1st.getChildren().get(1);
   
    //run command
    new NewFTEntryFactorCommand(factor12, "new foo factor", "2").runWithoutUnicaseCommand();
   
    //check
    assertEquals(1, factor12.getChildren().size());
    Factor newFactor = (Factor) factor12.getChildren().get(0);
    assertEquals("new foo factor", newFactor.getName());
    assertEquals("2", newFactor.getPriority());
    assertEquals("O1.2.1", newFactor.getNumbering());
    assertNotNull(newFactor.getDescription());
    assertNotNull(newFactor.getFlexibility());
    assertNotNull(newFactor.getChangeability());
    assertNotNull(newFactor.getInfluence());
  }
View Full Code Here

    assertNotNull(issueCard.getInfluencingFactors().get(3).getDescription());
  }
 
  @Test
  public void testDoRunForNonNullItem() {
    Factor factor = EMFfitModelFactory.eINSTANCE.createFactor();
    new NewIssueCardInfluencingFactorCommand(issueCard, factor).runWithoutUnicaseCommand();
    assertEquals(4, issueCard.getInfluencingFactors().size());
    assertEquals(factor, issueCard.getInfluencingFactors().get(3).getFactor());
    assertNotNull(issueCard.getInfluencingFactors().get(3).getDescription());
    assertEquals(project, ModelUtil.getProject(issueCard.getInfluencingFactors().get(3).getFactor()));
View Full Code Here

    Hypertext newInfluence = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(content);
    newInfluence.getContent().add(term);

    Factor factor = (Factor) ((FactorCategory) factorTable.getEntries()
        .get(1)).getChildren().get(0);

    // run command
    new UpdateFactorInfluenceCommand(factor, newInfluence)
        .runWithoutUnicaseCommand();

    // check results
    assertEquals(1, factor.getInfluence().getContent().size());
    assertEquals(content,
        ((Term) factor.getInfluence().getContent().get(0))
            .getVisibleContent());
  }
View Full Code Here

TOP

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

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.