Examples of JapidTemplate


Examples of cn.bran.japid.template.JapidTemplate

 
 
  @Test
  public void testElvis() throws IOException, ParseException {
    String src = readFile("tests/elvis.html");
    JapidTemplate bt = new JapidTemplate("tests/elvis.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler();
    cp.compile(bt);
    String srcCode = bt.javaSource;
    System.out.println(srcCode);
  }
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  }
 
  @Test
  public void testOpenIf() throws IOException, ParseException {
    String src = readFile("tests/openif.html");
    JapidTemplate bt = new JapidTemplate("tests/openif.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler();
    cp.compile(bt);
    String srcCode = bt.javaSource;
    System.out.println(srcCode);
    CompilationUnit cu = JavaSyntaxTool.parse(srcCode);
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  }
 
  @Test
  public void testSwitch() throws IOException, ParseException {
    String src = readFile("tests/switchCase.html");
    JapidTemplate bt = new JapidTemplate("tests/switchCase.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler();
    cp.compile(bt);
    String srcCode = bt.javaSource;
    System.out.println(srcCode);
    CompilationUnit cu = JavaSyntaxTool.parse(srcCode);
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testActionNotation() throws IOException {
    String src = readFile("JapidSample/app/japidviews/templates/Actions.html");
 
    JapidTemplate bt = new JapidTemplate("japidviews/templates/Actions.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    System.out.println(bt.javaSource);
    assertTrue("invalid java code", JavaSyntaxTool.isValid(bt.javaSource));
  }
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

 
  @Test
  public void testActionInvocation() throws IOException {
    String src = readFile("tests/actions.html");
   
    JapidTemplate bt = new JapidTemplate("tests/actions.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    String source = bt.javaSource;
    System.out.println(source);
    assertTrue("invalid java code", JavaSyntaxTool.isValid(source));
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testOpenBrace() throws IOException {
    String srcFile = "tests/openBrace.html";
    String src = readFile(srcFile);
   
    JapidTemplate bt = new JapidTemplate(srcFile, src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    System.out.println(bt.javaSource);
    assertTrue("invalid java code", JavaSyntaxTool.isValid(bt.javaSource));
  }
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testTagCalls() throws IOException {
    String srcFile = "tests/tagCalls.html";
    String src = readFile(srcFile);
   
    JapidTemplate bt = new JapidTemplate("tagCalls.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    String code = bt.javaSource;
    assertTrue("invalid java code", JavaSyntaxTool.isValid(bt.javaSource));
    System.out.println(code);
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testRecursiveTags() throws IOException {
    String srcFile = "tests/recursiveTagging.html";
    String src = readFile(srcFile);
   
    JapidTemplate bt = new JapidTemplate("tests/recursiveTagging.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    String code = bt.javaSource;
    System.out.println(code);
    assertTrue("invalid java code", JavaSyntaxTool.isValid(bt.javaSource));
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testTagline() throws IOException, ParseException {
    String srcFile = "tests/tagline.html";
    String src = readFile(srcFile);
   
    JapidTemplate bt = new JapidTemplate("tagline.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    String code = bt.javaSource;
    System.out.println(code);
    CompilationUnit cu = JavaSyntaxTool.parse(code);
View Full Code Here

Examples of cn.bran.japid.template.JapidTemplate

  @Test
  public void testTagNamedArgsWithBody() throws IOException, ParseException {
    String srcFile = "tests/callTagWithBody.html";
    String src = readFile(srcFile);
   
    JapidTemplate bt = new JapidTemplate("tests/callTagWithBody.html", src);
    JapidAbstractCompiler cp = new JapidTemplateCompiler ();
    cp.compile(bt);
    String code = bt.javaSource;
    assertTrue("invalid java code", JavaSyntaxTool.isValid(code));
    System.out.println(code);
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.