Methods Summary |
---|
public static void | main(java.lang.String[] argList)
// junit.textui.TestRunner.run(suite());
|
protected void | setUp()
try{
// TODO code application logic here
String url="jdbc:derby://localhost:1527/sun-callflow;retrieveMessagesFromServerOnGetMessage=true;create=true;";
Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
con = DriverManager.getConnection(url, "APP", "APP");
// drop request start table
ms = MethodStartAccessObjectImpl.getInstance();
} catch (Exception e){
e.printStackTrace();
}
|
protected void | tearDown()
try{
con.close();
} finally{
con = null;
}
|
public void | testCreateTable()Test of createTable method, of class com.sun.enterprise.admin.monitor.callflow.MethodStartAccessObjectImpl.
System.out.println("Method Start : testCreateTable");
boolean result = false;
try{
result = ms.createTable(con);
System.out.println("Method Start Create Table returned = "+ result);
}catch (Exception e){
e.printStackTrace();
}
assertTrue(result);
|
public void | testDropTable()Test of dropTable method, of class com.sun.enterprise.admin.monitor.callflow.MethodStartAccessObjectImpl.
System.out.println("Method Start testDropTable");
boolean result = ms.dropTable(con);
System.out.println("Method Start Drop Table returned = "+result);
assertTrue(result);
|
public void | testInsert()
System.out.println(" testStoreMethodStart");
try{
String insertSQL = ms.getInsertSQL();
System.out.println (" Insert SQL :"+ insertSQL);
pstmt = con.prepareStatement(insertSQL);
for (int i = 0; i < methodStart.length; i++) {
methodStart[i] = new MethodStartTO();
methodStart[i].requestId = "RequestID_"+i;
methodStart[i].timeStamp = System.nanoTime();
methodStart[i].componentType = ComponentType.SERVLET;
methodStart[i].componentName = "Component_Name_"+i;
methodStart[i].appName = "APP_NAME";
methodStart[i].methodName = "Method_Name_" +i;
methodStart[i].moduleName = "Module_Name_" +i;
methodStart[i].transactionId = "Transaction_Id_"+i;
methodStart[i].threadId = "Thread_Id_"+i;
methodStart[i].securityId = "watchman_"+i;
}
} catch (Exception e) {
e.printStackTrace();
}
boolean result = ms.insert (pstmt, methodStart);
System.out.println("testStoreMethodStart returned = "+result);
assertTrue (result);
|