Package com.google.gwt.dev.javac.testing

Examples of com.google.gwt.dev.javac.testing.JavaSource


    assertTrue(loader.loadClass("java.lang.String").getMethods().length > 0);
  }

  private JavaSource createFakeString() {
    return new JavaSource("java.lang.String") {
      public String getSource() {
        return "package java.lang;"
             + "public class String {}";
      }
    };
View Full Code Here


    }
    assertNotNull(javaSimple.getDeclaredMethod(expectedMethod));
  }

  private JavaSource createSimple() {
    return new JavaSource("com.google.gwt.inject.rebind.types.Simple") {
      public String getSource() {
        return "package com.google.gwt.inject.rebind.types;"
             + "public class Simple {"
             + "  public void b() {}"
             + "}";
View Full Code Here

    logger.setMaxDetail(TreeLogger.ERROR);
    return logger;
  }

  public void testContextIsNotAService() throws Exception {
    JavaSource simpleEnumTest = createMockJavaSource("test.Simple",
        "package test;",
        COMMON_IMPORTS,
        "public interface Simple extends RequestFactory {",
        "  SimpleContext simple();",
        "  public interface SimpleContext extends RequestContext {",
View Full Code Here

          + "is missing a @Service or @JsonRpcService annotation"));
    }
  }

  public void testExtraEnumsPulledFromParameterizedParameters() throws Exception {
    JavaSource simpleEnumTest = createMockJavaSource("test.Simple",
        "package test;",
        COMMON_IMPORTS,
        "public interface Simple extends RequestFactory {",
        "  SimpleContext simple();",
        "  @JsonRpcService",
View Full Code Here

    assertTrue(source.contains("@com.google.web.bindery.autobean.shared.impl.EnumMap.ExtraEnums("
        + "{test.Simple.SimpleContext.GetByIdRequest.GetByIdEnum.class})"));
  }

  private static JavaSource createMockJavaSource(String typeName, final String... lines) {
    return new JavaSource(typeName) {
      @Override
      public String getSource() {
        StringBuilder code = new StringBuilder();
        for (String line : lines) {
          code.append(line + "\n");
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.javac.testing.JavaSource

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.