@Test public void testSuccessCompilation() throws Exception { try { Compiler compiler = new RecipeCompiler(); CompileStatus status = compiler.compile( "parse-as-csv :body ' ' true;\n" + "set-column :abc, :edf;\n" + "send-to-error exp:{ window < 10 } ;\n" + "parse-as-simple-date :col 'yyyy-mm-dd' :col 'test' :col2,:col4,:col9 10 exp:{test < 10};\n" ); Assert.assertNotNull(status.getSymbols()); Assert.assertEquals(4, status.getSymbols().size()); } catch (CompileException e) { Assert.assertTrue(false); } }
@Override public CompileStatus compile(String recipe) throws CompileException { return compile(CharStreams.fromString(recipe)); }
RecipeCompiler implements Compiler { @Override public CompileStatus compile(String recipe) throws CompileException { return compile(CharStreams.fromString(recipe)); } }
RecipeCompiler implements Compiler { @Override public CompileStatus compile(String recipe) throws CompileException { return compile(CharStreams.fromString(recipe)); } RecipeCompiler(); }
RecipeCompiler implements Compiler { @Override public CompileStatus compile(String recipe) throws CompileException { return compile(CharStreams.fromString(recipe)); } RecipeCompiler(); @Override CompileStatus compile(String recipe); @Override CompileStatus compile(Location location); @Override CompileStatus compile(Path path); }
RecipeCompiler implements Compiler { @Override public CompileStatus compile(String recipe) throws CompileException { return compile(CharStreams.fromString(recipe)); } RecipeCompiler(); @Override CompileStatus compile(String recipe); @Override CompileStatus compile(Location location); @Override CompileStatus compile(Path path);  }