adding test scripts
[csql.git] / test / jdbc / Gateway / GwTest1.java
blob03fa447a317a2aeb6ffe2f1df8d9f2048d613e2f
1 // Connect with connectstring "jdbc:gateway" and give correct "user" and "password" in properties object.
2 //It should pass.when csqlserver is not runnig
3 import java.sql.*;
5 /**
7 * @author bijaya
8 */
9 public class GwTest1 {
10 public static void main(String[] args)
12 try
14 Class.forName("csql.jdbc.JdbcSqlDriver");
15 Connection con = DriverManager.getConnection("jdbc:gateway", "root", "manager");
16 if ( con == null )
18 System.out.println("Test Case Fail");
19 System.exit(1);
21 System.out.println("Test Case Passed");
22 con.close();
23 System.exit(0);
24 }catch(Exception e) {
25 System.out.println("Exception in Test: "+e);
26 e.getStackTrace();
27 System.exit(1);