Package com.googlecode.gwt.test.exceptions

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


            return defineClass(className, classfile, 0, classfile.length);
         } else {
            return defineClass(className, classfile, 0, classfile.length, domain);
         }
      } catch (Throwable t) {
         throw new GwtTestPatchException("Error while defining " + className
                  + " from modified bytecode", t);
      }
   }
View Full Code Here


      InputStream is = new ByteArrayInputStream(compiledClass.getBytes());

      try {
         source.makeClass(is);
      } catch (Exception e) {
         throw new GwtTestPatchException("Error while handling generated class '"
                  + compiledClass.getInternalName(), e);
      } finally {
         try {
            is.close();
         } catch (IOException e) {
View Full Code Here

            // Generate a synthetic JSO interface class.
            return overlayRewriter.writeJsoIntf(className);
         }

         if (isUnsupportedOverlayType(className)) {
            throw new GwtTestPatchException(
                     "Overlay type '"
                              + className
                              + "' has not been found. Did you forget to inherit some GWT module ? Does your GWT code compile using the -strict option ?");
         }
View Full Code Here

         return GwtReflectionUtils.instantiateClass(ctor, resultsHtml);
      } catch (Exception e) {
         if (GwtTestException.class.isInstance(e)) {
            throw (GwtTestException) e;
         } else {
            throw new GwtTestPatchException("Error while trying to instanciate "
                     + SubmitCompleteEvent.class.getName() + " class", e);
         }
      }
   }
View Full Code Here

      try {
         Class<?> clazz = Class.forName(JsValueGlue.JSO_IMPL_CLASS);
         return (JavaScriptObject) GwtReflectionUtils.instantiateClass(clazz);
      } catch (Exception e) {
         // should never happen
         throw new GwtTestPatchException("Error while instanciating JavaScriptObject :", e);
      }
   }
View Full Code Here

         GwtHtmlContentHandler contentHandler = new GwtHtmlContentHandler();
         xmlReader.setContentHandler(contentHandler);
         xmlReader.parse(new InputSource(new StringReader(html)));
         return contentHandler.getParsedNodes();
      } catch (Exception e) {
         throw new GwtTestPatchException("Error while parsing HTML '" + html + "'", e);
      }
   }
View Full Code Here

   static String encodePathSegmentImpl(String decodedURLComponent) {
      try {
         String url = URLEncoder.encode(decodedURLComponent, "UTF-8");
         return url.replaceAll("\\+", "%20").replaceAll("%2B", "+");
      } catch (UnsupportedEncodingException e) {
         throw new GwtTestPatchException(e);
      }
   }
View Full Code Here

   @PatchMethod
   static String encodeQueryStringImpl(String decodedURLComponent) {
      try {
         return URLEncoder.encode(decodedURLComponent, "UTF-8");
      } catch (UnsupportedEncodingException e) {
         throw new GwtTestPatchException(e);
      }
   }
View Full Code Here

   static JavaScriptObject parseImpl(XMLParserImpl xmlParserImpl, String contents) {

      try {
         return GwtXMLParser.parse(contents);
      } catch (Exception e) {
         throw new GwtTestPatchException("Error while parsing XML", e);
      }
   }
View Full Code Here

               && gwtFactory.getOverlayRewriter().isJsoIntf(f.getType().getName())) {
         try {
            return Class.forName(JsValueGlue.JSO_IMPL_CLASS);
         } catch (ClassNotFoundException e) {
            // should never happen
            throw new GwtTestPatchException("Error while creating a mock with Mockito for "
                     + f.getType().getName(), e);
         }
      } else {
         // null GwtFactory means the test is a mockito test not running with gwt-test-utils, e.g.
         // @RunWith(GwtRunner.class)
View Full Code Here

TOP

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

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.