Examples of Hypertext


Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

   
    //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
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext


public class SetHypertextTextElementVisibleContentCommandTest extends EMFfitTestCase {
 
  public void testDoRun() {
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    Link link = EMFfitModelFactory.eINSTANCE.createLink();
    link.setVisibleContent("link");
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" bar");
   
    hypertext.getContent().add(term1);
    hypertext.getContent().add(link);
    hypertext.getContent().add(term2);
   
    new SetHypertextTextElementVisibleContentCommand(hypertext, 4, "newlink").runWithoutUnicaseCommand();
   
    assertEquals(3, hypertext.getContent().size());
    assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
    assertEquals("newlink", hypertext.getContent().get(1).getVisibleContent());
    assertEquals(" bar", hypertext.getContent().get(2).getVisibleContent());
   
    new SetHypertextTextElementVisibleContentCommand(hypertext, 5, " newbar").runWithoutUnicaseCommand();
   
    assertEquals(3, hypertext.getContent().size());
    assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
    assertEquals("newlink", hypertext.getContent().get(1).getVisibleContent());
    assertEquals(" newbar", hypertext.getContent().get(2).getVisibleContent());
  }
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRun() {
    //setup
    String content = "foo bar";
   
    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();
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRunForNullFlexibility() {
    //setup
    String content = "foo bar";
   
    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
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

public class AddHypertextTermCommandTest extends EMFfitTestCase {

  @Test
  public void testDoRun() {
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
   
    term1.setVisibleContent("foo ");
    link1.setVisibleContent("link1");
    link2.setVisibleContent("link2");
    term2.setVisibleContent(" bar");
   
    hypertext.getContent().add(term1);
    hypertext.getContent().add(link1);
    hypertext.getContent().add(link2);
    hypertext.getContent().add(term2);
   
    new AddHypertextTermCommand(hypertext, 5, " thing ").runWithoutUnicaseCommand();
   
    assertEquals(5, hypertext.getContent().size());
   
    assertEquals(term1, hypertext.getContent().get(0));
    assertEquals(link1, hypertext.getContent().get(1));
    assertTrue(hypertext.getContent().get(2) instanceof Term);
    assertEquals(link2, hypertext.getContent().get(3));
   
    assertEquals(term2, hypertext.getContent().get(4));
  }
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRun() {
    // setup
    String content = "foo bar";

    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
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRun() {
    //setup
    String content = "foo bar";
   
    Hypertext newSolution = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(content);
    newSolution.getContent().add(term);
 
   
    //run command
    new UpdateIssueCardSolutionCommand(issueCard, newSolution).runWithoutUnicaseCommand();
   
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRunForNullFlexibility() {
    // setup
    String content = "foo bar";

    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);
    factor.setInfluence(null);
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  @Test
  public void testDoRunForNullDescription() {
    //setup
    String content = "foo bar";
   
    Hypertext newSolution = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(content);
    newSolution.getContent().add(term);
   
    issueCard.setDescription(null);
   
    //run command
    new UpdateIssueCardSolutionCommand(issueCard,newSolution ).runWithoutUnicaseCommand();
View Full Code Here

Examples of org.emftrace.metamodel.EMFfitModel.Hypertext

  }
 
  // tests add a term behind a link at text end
  @Test
  public void testDoRunForAppend() {
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
   
    term1.setVisibleContent("foo ");
    link1.setVisibleContent("link");
   
    hypertext.getContent().add(term1);
    hypertext.getContent().add(link1);
   
    new AddHypertextTermCommand(hypertext, 6, "").runWithoutUnicaseCommand();
   
    assertEquals(3, hypertext.getContent().size());
   
    assertEquals(term1, hypertext.getContent().get(0));
    assertEquals(link1, hypertext.getContent().get(1));
    assertTrue(hypertext.getContent().get(2) instanceof Term);
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.