Package org.jamesii.gui.syntaxeditor

Examples of org.jamesii.gui.syntaxeditor.InsertTokenAction


  public final void testRun() {

    String original =
        Strings.generateRandomString(random.nextInt(10000) + 25, random);

    InsertTokenAction action = new InsertTokenAction(null, 0, "HelloWorld!");

    assertNotNull(action);

    Reader input = new StringReader(original);
    StringWriter output = new StringWriter();

    action.run(input, output);

    assertEquals("HelloWorld!" + original, output.toString());

    action = new InsertTokenAction(null, 10, "HelloWorld!");

    assertNotNull(action);

    input = new StringReader(original);
    output = new StringWriter();

    action.run(input, output);

    assertEquals(
        original.substring(0, 10) + "HelloWorld!" + original.substring(10),
        output.toString());
View Full Code Here

TOP

Related Classes of org.jamesii.gui.syntaxeditor.InsertTokenAction

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.