Package com.googlecode.gwt.test.exceptions

Examples of com.googlecode.gwt.test.exceptions.GwtTestConfigurationException


      String moduleName = GwtConfig.get().getTestedModuleName();
      for (String className : ModuleData.get(moduleName).getCustomGeneratedClasses()) {
         try {
            result.add(GwtReflectionUtils.getClass(className));
         } catch (ClassNotFoundException e) {
            throw new GwtTestConfigurationException(
                     "Cannot find class configured to be instanced with a custom 'generate-with' Generator : '"
                              + className + "'");
         }
      }
View Full Code Here


      try {
         serviceImpl = GwtReflectionUtils.instantiateClass(GwtReflectionUtils.getClass(className.trim()));
      } catch (ClassNotFoundException e) {
         // should not happen..
         throw new GwtTestConfigurationException(e);
      }

      // cache the implementation
      servicesImplMap.put(servletPath, serviceImpl);
View Full Code Here

               remoteServiceRelativePath);

      if (remoteServiceImplClass == null) {
         return null;
      } else if (!remoteServiceClass.isAssignableFrom(remoteServiceImplClass)) {
         throw new GwtTestConfigurationException("The servlet class '"
                  + remoteServiceImplClass.getName() + "' setup for path '"
                  + remoteServiceRelativePath + "' does not implement RemoteService interface '"
                  + remoteServiceClass.getName());
      } else {
         try {
            return (T) GwtReflectionUtils.instantiateClass(remoteServiceImplClass);
         } catch (Exception e) {
            throw new GwtTestConfigurationException("Error during the instanciation of "
                     + RemoteService.class.getSimpleName() + " implementation for servlet path '"
                     + remoteServiceRelativePath + "'", e);
         }
      }
View Full Code Here

               }
            }

         }

         throw new GwtTestConfigurationException(
                  "Cannot find the .java file which contains declaration of "
                           + declaringClass.getName()
                           + ". Did you forget to add your java source directory path by declaring a 'src-directory' property in your META-INF/gwt-test-utils.properties configuration file ? (example : src/main/java = src-directory)");
      }
View Full Code Here

      private BrowserErrorHandler ensureDefault() {
         if (defaultHandler == null) {
            defaultHandler = GwtModuleRunnerAdapter.this.getDefaultBrowserErrorHandler();
            if (defaultHandler == null) {
               throw new GwtTestConfigurationException(
                        "You have to provide a non null instance of "
                                 + BrowserErrorHandler.class.getSimpleName() + " when overriding "
                                 + GwtModuleRunnerAdapter.class.getName()
                                 + ".getDefaultBrowserErrorHandler()");
            }
View Full Code Here

            // all.
            if (!mapUriToServlets.containsKey(entry.getKey())) {
               try {
                  mapUriToServlets.put(entry.getKey(), injector.getInstance(entry.getValue()));
               } catch (Throwable t) {
                  throw new GwtTestConfigurationException("cannot instantiate servlet", t);
               }
            }

            return mapUriToServlets.get(entry.getKey());
         }
      }

      throw new GwtTestConfigurationException("Cannot find servlet mapped to: " + uri);
   }
View Full Code Here

    */
   protected Injector getInjector() {
      Injector injector = GwtGuiceHelper.get().getInjector();

      if (injector == null) {
         throw new GwtTestConfigurationException(
                  this.getClass().getSimpleName()
                           + ".getInjector() default implementation is not able to localize the Guice Injector to use. You should override it to provide our own implementation");
      }

      return injector;
View Full Code Here

   @PatchMethod
   static boolean confirm(String msg) {
      WindowOperationsHandler handler = GwtConfig.get().getModuleRunner().getWindowOperationsHandler();
      if (handler == null) {
         throw new GwtTestConfigurationException(
                  "A call to Window.confirm(msg) was triggered, but no "
                           + WindowOperationsHandler.class.getSimpleName()
                           + " has been registered. You need to setup your own with the protected 'setWindowOperationsHandler' method available in your test class");

      }
View Full Code Here

            sb.append(line);
         }

         return sb.toString();
      } catch (IOException e) {
         throw new GwtTestConfigurationException("Error while reading module HTML host page '"
                  + hostPagePath + "'", e);
      } finally {
         if (br != null) {
            try {
               br.close();
View Full Code Here

                  Object instance = GwtReflectionUtils.instantiateClass(clazz);
                  this.injector = GwtReflectionUtils.callPrivateMethod(instance, "getInjector");
               }

            } catch (Exception e) {
               throw new GwtTestConfigurationException(
                        "Error while parsing web.xml searching for a Guice Injector in a configured GuiceServletContextListener",
                        e);
            }
         }
View Full Code Here

TOP

Related Classes of com.googlecode.gwt.test.exceptions.GwtTestConfigurationException

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.