- 1.7.6 초기 코드
[Tadpole.git] / com.hangum.tadpole.commons.sql.test / src / com / hangum / tadpole / system / TadpoleSystemCommonsTest.java
blob7784cd2b4340d7c569fa1bd9779f7016d880d8a5
1 /*******************************************************************************
2 * Copyright (c) 2013 hangum.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser Public License v2.1
5 * which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 *
8 * Contributors:
9 * hangum - initial API and implementation
10 ******************************************************************************/
11 package com.hangum.tadpole.system;
13 import com.hangum.tadpole.commons.dialogs.message.dao.RequestResultDAO;
14 import com.hangum.tadpole.engine.initialize.TadpoleEngineUserDB;
15 import com.hangum.tadpole.engine.sql.util.ExecuteDDLCommand;
17 import junit.framework.TestCase;
19 /**
20 * {@link com.hangum.tadpole.engine.sql.util.ExecuteDDLCommand 시스템쿼리}
22 * @author hangum
25 public class TadpoleSystemCommonsTest extends TestCase {
27 /**
28 * {@link com.hangum.tadpole.engine.sql.util.ExecuteDDLCommand#executSQL(com.hangum.db.dao.system.UserDBDAO, String) 쿼리실행(select 제외)}executeSQL
30 public void testExecutSQL() {
31 RequestResultDAO reqResultDAO = new RequestResultDAO();
32 try {
34 ExecuteDDLCommand.executSQL(TadpoleEngineUserDB.getUserDB(), reqResultDAO, "CREATE TABLE sample_table_a ( id INTEGER NOT NULL, name char(60) default NULL, PRIMARY KEY (id) );");
36 ExecuteDDLCommand.executSQL(TadpoleEngineUserDB.getUserDB(), reqResultDAO, "INSERT INTO sample_table_a (id, name) VALUES ( 1, '11' ); ");
38 ExecuteDDLCommand.executSQL(TadpoleEngineUserDB.getUserDB(), reqResultDAO, "drop table sample_table_a; ");
40 } catch (Exception e) {
41 fail("execute sql " + e.getMessage());
43 e.printStackTrace();