Package cn.bran.japid.compiler

Source Code of cn.bran.japid.compiler.BranLayoutCompilerTest

package cn.bran.japid.compiler;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

import org.junit.Test;

import cn.bran.japid.compiler.JapidAbstractCompiler;
import cn.bran.japid.compiler.JapidLayoutCompiler;
import cn.bran.japid.template.JapidTemplate;



/**
*
* @author bran
* @deprecated now is on the {@code BranCompilerTests}
*/
public class BranLayoutCompilerTest {

  @Test
  public void testHop() throws IOException {
    FileInputStream fis = new FileInputStream("JapidSample/app/japidviews/_layouts/Layout.html");
    InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
    BufferedReader br = new BufferedReader(isr);
    String src = "";
    for(String line = br.readLine(); line != null; line = br.readLine()) {
      src += line + "\n";
    }
   
    JapidTemplate bt = new JapidTemplate("tag/Layout.html", src);
    JapidAbstractCompiler cp = new JapidLayoutCompiler();
    cp.compile(bt);
    System.out.println(bt.javaSource);
  }
}
TOP

Related Classes of cn.bran.japid.compiler.BranLayoutCompilerTest

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.