/*
 * This code is generated by blanco Framework.
 * BlancoDbXmlSerializer具象化SAXクラステストクラス<br>
 */
package blanco.db.concretesax;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import junit.framework.TestCase;

/**
 * BlancoDbXmlSerializer具象化SAXクラステストクラス<br>
 * SAXを利用したXML書き出しをラッピングするクラスのテストクラスです。<br>
 * このクラスは解析用XMLファイルを入力として具象化SAXクラスとして生成されました。<br>
 * このソースコードはblancoIgにより機械的に自動生成されています。
 */
public class BlancoDbXmlSerializerTest extends TestCase {

    public void testSerializer() throws Exception {
        OutputStream outStream = null;
        try {
            outStream = new BufferedOutputStream(new FileOutputStream("output.xml"));
            BlancoDbXmlSerializer serializer = new BlancoDbXmlSerializer(outStream);
            serializer.startDocument();
            serializer.startElementWorkbook();
            serializer.characters("\n");
            serializer.characters("  ");
            serializer.startElementSheet("queryName");
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.startElementBlancodbCommon();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementQueryType();
            serializer.characters("caller");
            serializer.endElementQueryType();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementSingle();
            serializer.characters("false");
            serializer.endElementSingle();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementName();
            serializer.characters("selectAll");
            serializer.endElementName();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementScroll();
            serializer.characters("forward_only");
            serializer.endElementScroll();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementUpdatable();
            serializer.characters("false");
            serializer.endElementUpdatable();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.endElementBlancodbCommon();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.startElementBlancodbInparameters();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementInparameter();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementNo();
            serializer.characters("param1");
            serializer.endElementNo();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementName();
            serializer.characters("param1");
            serializer.endElementName();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementType();
            serializer.characters("java.lang.Long");
            serializer.endElementType();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementDescription();
            serializer.characters("コメント");
            serializer.endElementDescription();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementSamplevalue();
            serializer.characters("参考値");
            serializer.endElementSamplevalue();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.endElementInparameter();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.endElementBlancodbInparameters();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.startElementBlancodbOutparameters();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementOutparameter();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementNo();
            serializer.characters("param1");
            serializer.endElementNo();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementName();
            serializer.characters("param");
            serializer.endElementName();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementType();
            serializer.characters("float");
            serializer.endElementType();
            serializer.characters("\n");
            serializer.characters("        ");
            serializer.startElementDescription();
            serializer.characters("コメント");
            serializer.endElementDescription();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.endElementOutparameter();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.endElementBlancodbOutparameters();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.startElementBlancodbDetail();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementDetailLine();
            serializer.characters("detail");
            serializer.endElementDetailLine();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementDetailLine();
            serializer.characters("of query");
            serializer.endElementDetailLine();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.endElementBlancodbDetail();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.startElementBlancodbQuery();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementQueryLine();
            serializer.characters("select * from dula");
            serializer.endElementQueryLine();
            serializer.characters("\n");
            serializer.characters("      ");
            serializer.startElementQueryLine();
            serializer.characters("order by a");
            serializer.endElementQueryLine();
            serializer.characters("\n");
            serializer.characters("    ");
            serializer.endElementBlancodbQuery();
            serializer.characters("\n");
            serializer.characters("  ");
            serializer.endElementSheet();
            serializer.characters("\n");
            serializer.endElementWorkbook();
            serializer.endDocument();
            outStream.flush();
        } finally {
            try {
                if (outStream != null) {
                    outStream.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
