Java Doc for SpringUnitTransactionalTest.java in  » Testing » springunit-0.6 » org » springunit » framework » 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 » Testing » springunit 0.6 » org.springunit.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springunit.framework.SpringUnitTransactionalTest

All known Subclasses:   org.springunit.framework.samples.jpetstore.dao.AbstractDaoTest,  org.springunit.framework.junit4.SpringUnit4TransactionalTest,  org.springunit.framework.tests.OneDeepTransactionalTest,
SpringUnitTransactionalTest
abstract public class SpringUnitTransactionalTest extends AbstractTransactionalSpringContextTests (Code)
Extends Spring's test framework to support transactional data-driven tests. Data-driven tests separate data values from test logic, keeping data values in external files and test logic in Java code. Every descendent of SpringUnitTransactionalTest is required by convention to have a bean called Classname of type SpringUnitContext, where Classname is the simple name of the subclass of SpringUnitTransactionalTest. Note that the simple names of subclasses must be unique, that is, they must not be distinguished solely by different package qualifiers.
author:
   Ted Velkoff



Constructor Summary
protected  SpringUnitTransactionalTest()
     Default constructor.
protected  SpringUnitTransactionalTest(String name)
     Constructor with JUnit name.

Method Summary
final protected  String[]getConfigLocations()
     Return list of file names that the Spring test framework uses in order to create beans for testing.
final protected  TgetObject(String key)
     Search for object identified by key in the hierarchy of contexts.
protected  voidonSetUpInTransaction()
     Subclasses should override this method to perform any setup operations, such as populating a database table, within the transaction created by this class.
protected  voidonSetUpInTransactionAtBeginning()
    
final protected  voidonTearDownAfterTransaction()
     Calls onTearDownAfterTransactionEnds so that subclasses can insert behavior at conclusion of transaction.
protected  voidonTearDownAfterTransactionEnds()
     Subclasses can override this method to perform cleanup here.


Constructor Detail
SpringUnitTransactionalTest
protected SpringUnitTransactionalTest()(Code)
Default constructor.



SpringUnitTransactionalTest
protected SpringUnitTransactionalTest(String name)(Code)
Constructor with JUnit name. Sets AutowireMode to "by name" (overriding the default, which is "by type"). Creates a hierarchy of contexts.
Parameters:
  fName - Name of JUnit test




Method Detail
getConfigLocations
final protected String[] getConfigLocations()(Code)
Return list of file names that the Spring test framework uses in order to create beans for testing. Array of string filenames



getObject
final protected T getObject(String key) throws Exception(Code)
Search for object identified by key in the hierarchy of contexts.
Parameters:
  key - Identifier of data value to find Object if found or null
throws:
  Exception - if errors occur when using reflectionto access the SpringUnitContext for anyclass in the list



onSetUpInTransaction
protected void onSetUpInTransaction() throws Exception(Code)
Subclasses should override this method to perform any setup operations, such as populating a database table, within the transaction created by this class.

NB: Not called if there is no transaction management, due to no transaction manager being provided in the context.
Note: This overriding of onSetUpInTransaction is deprecated in SpringUnit and will be removed in a future release. Subclasses that previously overrode onSetUpInTransactionAtBeginning should instead override this method.
throws:
  Exception - simply let any exception propagate




onSetUpInTransactionAtBeginning
protected void onSetUpInTransactionAtBeginning() throws Exception(Code)

throws:
  Exception -



onTearDownAfterTransaction
final protected void onTearDownAfterTransaction() throws Exception(Code)
Calls onTearDownAfterTransactionEnds so that subclasses can insert behavior at conclusion of transaction. The transaction is not open anymore at this point. Follows by calling setDirty so that all beans created from configuration files are refreshed.
throws:
  Exception - simply let any exception propagate



onTearDownAfterTransactionEnds
protected void onTearDownAfterTransactionEnds() throws Exception(Code)
Subclasses can override this method to perform cleanup here. The transaction is not open anymore at this point.
throws:
  Exception - simply let any exception propagate



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