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
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
;
20 * {@link com.hangum.tadpole.engine.sql.util.ExecuteDDLCommand 시스템쿼리}
25 public class TadpoleSystemCommonsTest
extends TestCase
{
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();
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());