Java Doc for TestConfiguration.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » junit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derbyTesting.junit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derbyTesting.junit.TestConfiguration

TestConfiguration
public class TestConfiguration (Code)
Class which holds information about the configuration of a Test.



Constructor Summary
 TestConfiguration(TestConfiguration copy, String user, String password)
     Obtain a new configuration identical to the passed in one except for the default user and password.

Method Summary
public static  TestchangeUserDecorator(Test test, String user, String password)
    
 booleandefaultSecurityManagerSetup()
     Install the default security manager setup, for the current configuration.
public static  TestderbyClientServerDecorator(Class suite)
     Return a decorator for the passed in tests that sets the configuration for the client to be Derby's JDBC client and to start the network server at setUp and shut it down at tearDown.
public  ConnectiongetConnection(String databaseName, String connAttrs)
     Get a connection to a database using the specified connection attributes.
public static  TestConfigurationgetCurrent()
     Get this Thread's current configuraiton for running the tests.
public static  PropertiesgetDataSourcePropertiesForDatabase(String databaseName, String connAttrs)
     Generate properties which can be set on a DataSource in order to connect to a database using the specified connection attributes.
public  StringgetDatabaseName()
     Return the default database name.
public  ConnectiongetDefaultConnection(String connAttrs)
     Get a connection to the default database using the specified connection attributes.
public static  PropertiesgetDefaultDataSourceProperties()
     Generate properties which can be set on a DataSource in order to connect to the default database.
 FilegetFailureFolder(TestCase test)
     Get a folder already created where a test can write its failure information.
public  StringgetHostName()
     Return the host name for the network server.
public  JDBCClientgetJDBCClient()
     Get configured JDBCClient object.
public  StringgetJDBCUrl()
     Return the jdbc url for connecting to the default database.
public  StringgetJDBCUrl(String databaseName)
     Return the jdbc url for a connecting to the database.
Parameters:
  databaseName - name of database.
public  intgetPort()
     Get port number for network server.
public  StringgetUserName()
     Return the user name.
public  StringgetUserPassword()
     Return the user password.
public  booleanisSingleLegXA()
    
public  booleanisVerbose()
     Return verbose flag.
public static  booleanloadingFromJars()
    

Return true if we classes are being loaded from jar files.

public  ConnectionopenConnection(String databaseName)
     Open a connection to a database.
public  ConnectionopenDefaultConnection()
     Open connection to the default database.
public static  booleanrunningInDerbyHarness()
     Is this JUnit test being run by the old harness.
static  voidsetCurrent(TestConfiguration config)
     WORK IN PROGRESS Set this Thread's current configuration for running tests.
public  voidsetVerbosity(boolean isChatty)
     Set the verbosity, i.e., whether debug statements print.


Constructor Detail
TestConfiguration
TestConfiguration(TestConfiguration copy, String user, String password)(Code)
Obtain a new configuration identical to the passed in one except for the default user and password.
Parameters:
  copy - Configuration to copy.
Parameters:
  user - New default user
Parameters:
  password - New default password.




Method Detail
changeUserDecorator
public static Test changeUserDecorator(Test test, String user, String password)(Code)



defaultSecurityManagerSetup
boolean defaultSecurityManagerSetup() throws PrivilegedActionException(Code)
Install the default security manager setup, for the current configuration.
throws:
  PrivilegedActionException -



derbyClientServerDecorator
public static Test derbyClientServerDecorator(Class suite) throws Exception(Code)
Return a decorator for the passed in tests that sets the configuration for the client to be Derby's JDBC client and to start the network server at setUp and shut it down at tearDown.
The database configuration (name etc.) is based upon the previous configuration.
The previous TestConfiguration is restored at tearDown.
Parameters:
  tests -
throws:
  Exception -



getConnection
public Connection getConnection(String databaseName, String connAttrs) throws SQLException(Code)
Get a connection to a database using the specified connection attributes.
Parameters:
  databaseName - database to connect to
Parameters:
  connAttrs - connection attributes connection to database.
throws:
  SQLException -



getCurrent
public static TestConfiguration getCurrent()(Code)
Get this Thread's current configuraiton for running the tests. TestConfiguration to use.



getDataSourcePropertiesForDatabase
public static Properties getDataSourcePropertiesForDatabase(String databaseName, String connAttrs)(Code)
Generate properties which can be set on a DataSource in order to connect to a database using the specified connection attributes.
Parameters:
  databaseName - database to connect to
Parameters:
  connAttrs - connection attributes



getDatabaseName
public String getDatabaseName()(Code)
Return the default database name. default database name.



getDefaultConnection
public Connection getDefaultConnection(String connAttrs) throws SQLException(Code)
Get a connection to the default database using the specified connection attributes.
Parameters:
  connAttrs - connection attributes connection to database.
throws:
  SQLException -



getDefaultDataSourceProperties
public static Properties getDefaultDataSourceProperties()(Code)
Generate properties which can be set on a DataSource in order to connect to the default database. If the database does not exist, it will be created. a Properties object containing servername, port number, database name and other attributes needed toconnect to the default database



getFailureFolder
File getFailureFolder(TestCase test)(Code)
Get a folder already created where a test can write its failure information. The name of the folder, relative to ${user.dir} is:
fail/client/testclass/testname
  • client - value of JDBCClient.getName() for the test's configuration
  • testclass - last element of the class name
  • testname - value of test.getName()



getHostName
public String getHostName()(Code)
Return the host name for the network server. host name.



getJDBCClient
public JDBCClient getJDBCClient()(Code)
Get configured JDBCClient object. JDBCClient



getJDBCUrl
public String getJDBCUrl()(Code)
Return the jdbc url for connecting to the default database. JDBC url.



getJDBCUrl
public String getJDBCUrl(String databaseName)(Code)
Return the jdbc url for a connecting to the database.
Parameters:
  databaseName - name of database. JDBC connection url, including database name.



getPort
public int getPort()(Code)
Get port number for network server. port number.



getUserName
public String getUserName()(Code)
Return the user name. user name.



getUserPassword
public String getUserPassword()(Code)
Return the user password. user password.



isSingleLegXA
public boolean isSingleLegXA()(Code)
Return if it has to run under single legged xa transaction singleLegXA



isVerbose
public boolean isVerbose()(Code)
Return verbose flag. verbose flag.



loadingFromJars
public static boolean loadingFromJars()(Code)

Return true if we classes are being loaded from jar files. For the time being, this simply tests that the JVMInfo class (common to the client and the server) comes out of a jar file.




openConnection
public Connection openConnection(String databaseName) throws SQLException(Code)
Open a connection to a database. If the database does not exist, it will be created. A default username and password will be used for the connection.
Parameters:
  databaseName - database to connect to connection to database.



openDefaultConnection
public Connection openDefaultConnection() throws SQLException(Code)
Open connection to the default database. If the database does not exist, it will be created. A default username and password will be used for the connection. connection to default database.



runningInDerbyHarness
public static boolean runningInDerbyHarness()(Code)
Is this JUnit test being run by the old harness. Temp method to ease the switch over by allowing suites to alter their behaviour based upon the need to still run under the old harness.



setCurrent
static void setCurrent(TestConfiguration config)(Code)
WORK IN PROGRESS Set this Thread's current configuration for running tests.
Parameters:
  config - Configuration to set it to.



setVerbosity
public void setVerbosity(boolean isChatty)(Code)
Set the verbosity, i.e., whether debug statements print.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.