[Batchserver-cvs] batchserver/test/org/jmonks/batchserver/framework/repository/jdbc MySQLJdbcRepos
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-09-10 22:17:14
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/repository/jdbc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18838 Modified Files: JdbcRepositoryTest.java Added Files: MySQLJdbcRepository.java Log Message: no message Index: JdbcRepositoryTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/repository/jdbc/JdbcRepositoryTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JdbcRepositoryTest.java 10 Sep 2006 17:58:52 -0000 1.1 --- JdbcRepositoryTest.java 10 Sep 2006 22:17:12 -0000 1.2 *************** *** 9,34 **** import junit.framework.*; ! import java.io.ByteArrayInputStream; ! import java.io.ByteArrayOutputStream; ! import java.io.IOException; ! import java.io.InputStream; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.sql.Connection; ! import java.sql.PreparedStatement; ! import java.sql.ResultSet; ! import java.sql.SQLException; ! import java.sql.Timestamp; ! import java.sql.Types; ! import java.util.ArrayList; ! import java.util.HashMap; ! import java.util.List; ! import java.util.Map; ! import org.apache.log4j.Logger; ! import org.jmonks.batchserver.framework.ErrorCode; ! import org.jmonks.batchserver.framework.JobStatistics; ! import org.jmonks.batchserver.framework.config.ConfigurationException; ! import org.jmonks.batchserver.framework.repository.Repository; ! import org.jmonks.batchserver.framework.util.JdbcConnectionHelper; /** --- 9,14 ---- import junit.framework.*; ! ! /** *************** *** 64,71 **** public void testInit() { ! System.out.println("testInit"); ! ! // TODO add your test code below by replacing the default call to fail. ! fail("The test case is empty."); } --- 44,56 ---- public void testInit() { ! try ! { ! MySQLJdbcRepository repository=new MySQLJdbcRepository(); ! repository.init(repository.getMySQLConfigMap()); ! } ! catch(Exception exception) ! { ! fail("MySQL Jdbc Repository init was failed."); ! } } *************** *** 75,82 **** public void testClearDataTransferredToNextJob() { - System.out.println("testClearDataTransferredToNextJob"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 60,63 ---- *************** *** 86,93 **** public void testSendDataToNextJob() { - System.out.println("testSendDataToNextJob"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 67,70 ---- *************** *** 97,104 **** public void testGetDataFromPreviousJob() { - System.out.println("testGetDataFromPreviousJob"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 74,77 ---- *************** *** 108,115 **** public void testLogStatistics() { - System.out.println("testLogStatistics"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 81,84 ---- *************** *** 119,126 **** public void testGetStatistics() { - System.out.println("testGetStatistics"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 88,91 ---- *************** *** 130,137 **** public void testLookupJobMgmtMntrInfo() { - System.out.println("testLookupJobMgmtMntrInfo"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 95,98 ---- *************** *** 141,148 **** public void testUnregisterJobMgmtMntrInfo() { - System.out.println("testUnregisterJobMgmtMntrInfo"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 102,105 ---- *************** *** 152,159 **** public void testRegisterJobMgmtMntrInfo() { - System.out.println("testRegisterJobMgmtMntrInfo"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 109,112 ---- *************** *** 163,170 **** public void testGetAllRegisteredMgmtMntrInfo() { - System.out.println("testGetAllRegisteredMgmtMntrInfo"); - - // TODO add your test code below by replacing the default call to fail. - fail("The test case is empty."); } --- 116,119 ---- --- NEW FILE: MySQLJdbcRepository.java --- /* * MySQLJdbcRepository.java * * Created on September 10, 2006, 5:08 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.repository.jdbc; import java.util.HashMap; import java.util.Map; import org.jmonks.batchserver.framework.util.JdbcConnectionHelper; /** * * @author Suresh Pragada */ public class MySQLJdbcRepository extends JdbcRepository { /** Creates a new instance of MySQLJdbcRepository */ public MySQLJdbcRepository() { } public void init(Map configMap) { super.init(configMap); } public Map getMySQLConfigMap() { Map configMap=new HashMap(); configMap.put(JdbcConnectionHelper.PROPERTY_JDBC_DRIVER_CLASS_NAME, ""); configMap.put(JdbcConnectionHelper.PROPERTY_JDBC_URL, ""); configMap.put(JdbcConnectionHelper.PROPERTY_DATABASE_USER_NAME, ""); configMap.put(JdbcConnectionHelper.PROPERTY_DATABASE_PASSWORD, ""); return configMap; } } |