public class SetHypertextLinkTargetCommandTest 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 SetHypertextLinkTargetCommand(hypertext, 4, issueCard).runWithoutUnicaseCommand();
assertEquals(3, hypertext.getContent().size());
assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
assertEquals("link", hypertext.getContent().get(1).getVisibleContent());
assertEquals(" bar", hypertext.getContent().get(2).getVisibleContent());
assertEquals(issueCard, ((Link) hypertext.getContent().get(1)).getTarget());
}