Package ro.isdc.wro.model.resource.processor

Examples of ro.isdc.wro.model.resource.processor.ResourcePostProcessor.process()


      protected void onLinterException(final LinterException e, final Resource resource) {
        throw e;
      };
    }.setOptionsAsString("maxerr=1");

    processor.process(new StringReader("alert(;"), new StringWriter());
  }

  @Test(expected = LinterException.class)
  public void shouldFailWhenScriptContainsErrors()
      throws Exception {
View Full Code Here


      @Override
      protected String createDefaultOptions() {
        return "maxerr=1";
      }
    };
    processor.process(new StringReader("alert(;"), new StringWriter());
  }

  @Test
  public void canBeExecutedMultipleTimes()
      throws Exception {
View Full Code Here

      protected void onLinterException(final LinterException e, final Resource resource) {
        cause.set(e);
      };
    }.setOptionsAsString("maxerr=1");

    processor.process(new StringReader("alert(;"), new StringWriter());
    Assert.assertNotNull(cause.get());
  }

  /**
   * This test was created initially to prove that {@link JsHintProcessor} is thread-safe, but it doesn't work well when
View Full Code Here

      throws Exception {
    final ResourcePostProcessor processor = new JsonHPackProcessor(pack);
    final Callable<Void> task = new Callable<Void>() {
      public Void call() {
        try {
          processor.process(new StringReader("{p : 1}"), new StringWriter());
        } catch (final Exception e) {
          throw new RuntimeException(e);
        }
        return null;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.