00001 package net.threebit.utils.sosc.test;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 import java.io.*;
00023 import java.sql.*;
00024 import java.util.*;
00025 import java.util.logging.*;
00026 import junit.framework.*;
00027 import net.threebit.utils.sosc.*;
00028
00033 public class ExcelTest extends TestCase {
00034
00035 private DbTool getDbTool() throws Exception {
00036 String url = System.getProperty("net.threebit.utils.sosc.DbTool.jdbcURL");
00037 String className = System.getProperty("net.threebit.utils.sosc.DbTool.jdbcURLClassName");
00038 String userName = System.getProperty("net.threebit.utils.sosc.DbTool.jdbcURLUserName");
00039 String password = System.getProperty("net.threebit.utils.sosc.DbTool.jdbcURLPassword");
00040 return new DbTool(className, url, userName, password);
00041 }
00042
00043 public void test1() throws Exception {
00044 ExcelSheet es = new ExcelSheet("sheetName","title");
00045 es.setTitle("Test Title");
00046 es.drawTable("test table", getDbTool().query(" select 1 as one, 2 as two, 3 as three "), "A1");
00047 es.render( new FileOutputStream("/src/www/kevino/ExcelText.html"));
00048 }
00049
00050 }