package test.org.itscool.stylist.io;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.FileReader;

import junit.framework.TestCase;

import org.itscool.stylist.io.HtmlConfigReader;
import org.itscool.stylist.tag.HtmlRootTag;

public class HtmlConfigReaderTest3 extends TestCase{
    public void testParseSuccess1(){
        System.out.println("***************** testParseSuccess1 **********************");
        HtmlConfigReader reader = new HtmlConfigReader();
        HtmlRootTag html = new HtmlRootTag("Shift_JIS");
        try{
            reader.create("j2src/test/test/org/itscool/stylist/io/sample_layout.html", html);
            System.out.println(html.toString(1, " "));
        }catch(Exception e){
            fail(e.getMessage());
            e.printStackTrace();
        }
    }
    
    public void testParseSuccess2(){
        System.out.println("***************** testParseSuccess2 **********************");
        HtmlConfigReader reader = new HtmlConfigReader();
        HtmlRootTag html = new HtmlRootTag("Shift_JIS");
        try{
            reader.create("j2src/test/test/org/itscool/stylist/io/sample_layout.html", html);
            System.out.println(html.toString(1, " "));
        }catch(Exception e){
            fail(e.getMessage());
            e.printStackTrace();
        }
        
        HtmlConfigReader reader2 = new HtmlConfigReader();
        HtmlRootTag html2 = new HtmlRootTag("Shift_JIS");
        try{
            reader2.create("j2src/test/test/org/itscool/stylist/io/sample_layout.html", html2);
            System.out.println(html2.toString(1, " "));
        }catch(Exception e){
            fail(e.getMessage());
            e.printStackTrace();
        }
    }
}
