Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.FactorCategory


  /* (non-Javadoc)
   * @see emffit_commands.EMFfitCommand#doRun()
   */
  @Override
  protected void doRun() {
    FactorCategory newCategory = EMFfitModelFactory.eINSTANCE.createFactorCategory();
    newCategory.setName(name);
    newCategory.setNumbering(entry.getNumbering()+"."+new Integer(entry.getChildren().size()+1).toString());
    entry.getChildren().add(newCategory);
  }
View Full Code Here


            && (line.contains(categoryType.getLiteral()
                .toUpperCase()))) {
          break;
        }
        if (active) {
          FactorCategory factorCategory = EMFfitModelFactory.eINSTANCE
              .createFactorCategory();
          factorCategory.setName(line);

          factorCategory.setNumbering(typeStr
              + (factorTable.getEntries().size() + 1));
          factorTable.getEntries().add(factorCategory);
        }
      }
    } catch (FileNotFoundException e) {
View Full Code Here

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

public class NewFTEntryCategoryCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRunForFactorCategory() {
    //setup
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
   
    //run command
    new NewFTEntryCategoryCommand(fc1st, "new foo subcategory").runWithoutUnicaseCommand();
   
    //check
    assertEquals(5, fc1st.getChildren().size());
    FactorCategory newFactorCategory =  (FactorCategory) fc1st.getChildren().get(4);
    assertEquals("new foo subcategory", newFactorCategory.getName());
    assertEquals("O1.5", newFactorCategory.getNumbering());
  }
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

public class SetFTEntryNumberingCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRunForCategory() {
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    new SetFTEntryNumberingCommand(fc1st,"X1.2.3").runWithoutUnicaseCommand();
    assertEquals("X1.2.3", fc1st.getNumbering());

  }
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

public class NewFTEntryFactorCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRunForFactorCategory() {
    //setup
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
   
    //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());
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
View Full Code Here

TOP

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

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.