Package com.google.gxp.compiler.alerts.common

Examples of com.google.gxp.compiler.alerts.common.InvalidNameError


  }

  public void testTemplate_invalidName() throws Exception {
    FileRef gxp = createFile("Holy!Cow!", "Hello");
    compileFiles(gxp);
    assertAlert(new InvalidNameError(
             pos(1, 648), "com.google.gxp.compiler.errortests.Holy!Cow!"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here


    assertNoUnexpectedAlerts();
  }

  public void testImport_invalidClassName() throws Exception {
    compile("<gxp:import class='com.google.bad!name' />");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.bad!name"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

    assertNoUnexpectedAlerts();
  }

  public void testImport_invalidPackageName() throws Exception {
    compile("<gxp:import package='com.google.bad!name' />");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.bad!name"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

    assertNoUnexpectedAlerts();

    // bad (other whitespace)
    compile("<gxp:import class='com.google.fo o.Bar'/>",
            "<gxp:import class='com.google.b az'/>");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.fo o.Bar"));
    assertAlert(new InvalidNameError(pos(3,1), "com.google.b az"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

    assertNoUnexpectedAlerts();
  }

  public void testThrows_invalidClassName() throws Exception {
    compile("<gxp:throws exception='com.google.holy!cow' />");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.holy!cow"));
    assertNoUnexpectedAlerts();

    compile("<gxp:throws exception='FoobarException' />");
    assertNoUnexpectedAlerts();
  }
View Full Code Here

* Tests of proper error reporting by the GXP compiler relating to calls.
*/
public class CallErrorTest extends BaseTestCase {
  public void testCall_invalidCallee() throws Exception {
    compile("<call:ham-and-eggs/>");
    assertAlert(new InvalidNameError(pos(2, 1), "ham-and-eggs"));
    assertNoUnexpectedAlerts();

    compile("<call:dots..dots/>");
    assertAlert(new InvalidNameError(pos(2, 1), "dots..dots"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

      packageName = null;
      baseName = dottedName;
    }
    if (!isValidPackageName(packageName) || !isValidBaseName(baseName)) {
      if (alertSink != null) {
        alertSink.add(new InvalidNameError(sourcePosition, dottedName));
      }
    }
    return create(packageName, baseName);
  }
View Full Code Here

  }

  public void testTemplate_invalidName() throws Exception {
    FileRef gxp = createFile("Holy!Cow!", "Hello");
    compileFiles(gxp);
    assertAlert(new InvalidNameError(
             pos(1, 700), "com.google.gxp.compiler.errortests.Holy!Cow!"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

    assertNoUnexpectedAlerts();
  }

  public void testImport_invalidClassName() throws Exception {
    compile("<gxp:import class='com.google.bad!name' />");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.bad!name"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

    assertNoUnexpectedAlerts();
  }

  public void testImport_invalidPackageName() throws Exception {
    compile("<gxp:import package='com.google.bad!name' />");
    assertAlert(new InvalidNameError(pos(2,1), "com.google.bad!name"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.alerts.common.InvalidNameError

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.