Java Doc for DDStepsTestCase.java in  » Testing » DDSteps » org » ddsteps » 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 » DDSteps » org.ddsteps 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.ddsteps.DDStepsTestCase

All known Subclasses:   org.ddsteps.testcase.support.DDStepsExcelTestCase,  org.ddsteps.DdTestCase,
DDStepsTestCase
abstract public class DDStepsTestCase extends TestCase implements DdBehaviourCallbackHandler(Code)
DDSteps base class for unit tests that want to controll their own dataloader.

In your test subclass you must implement:

You may implement these hooks if you want to:


author:
   adamskogman


Field Summary
static  LogLOG
    
 DdBehaviourbehaviour
     Dependency: The Behaviour delegate.
 StringfullName
     Property: Full, datadriven name of this testcase, i.e.

Constructor Summary
public  DDStepsTestCase()
     Standard, no args constructor.

The JUnit contract dictates that if no constructor with a String (name) argument i sfound, this no-args constructor is used, and then setName() is called.


Method Summary
final public  intcountTestCases()
     Delegate to behaviour.
abstract protected  DataLoadercreateDataLoader()
     Factory Method: You as a user of DDSteps must implement this.
 DdBehaviourgetBehaviour()
     The appropriate behaviour for this test case instance, given the name.
final public  StringgetName()
     Returns the full, data driven name, such as testMethod[Rox 13].
final public  voidrun(TestResult result)
     Delegate to behaviour.
final public  voidsetName(String name)
     Overrides setName to handle DDSteps "data driven" names, such as testMethod[Row 13].

Overriding this method is the only way we can make sure that the name is always handled correctly.

The name can be either that of the test method (i.e.

final public  voidsetUp()
     Delegate to behaviour.
public  voidsetUpAfterData()
     Override this in your subclass, if desired.
public  voidsetUpBeforeData()
     Override this in your subclass, if desired.
public  voidsetUpMethod()
     Override this in your subclass, if desired.
final public  voidtearDown()
     Delegate to behaviour.
public  voidtearDownAfterData()
     Override this in your subclass, if desired.
public  voidtearDownBeforeData()
     Override this in your subclass, if desired.
public  voidtearDownMethod()
     Override this in your subclass, if desired.
public  StringtoString()
     Not the same toString as JUnit, instead use a javadoc style syntax.

Field Detail
LOG
static Log LOG(Code)
Logger



behaviour
DdBehaviour behaviour(Code)
Dependency: The Behaviour delegate.



fullName
String fullName(Code)
Property: Full, datadriven name of this testcase, i.e. testMethod if a method instance, or testMethod[Row 13] if a row instance.

The fName in TestCase must not have this string, instead, it will only ever have the testMethod, as that variable is used in runTest() to determine what method to run using reflection.

This property is set using (@link #setName(String)) which will set fName in TestCase to only the method part.





Constructor Detail
DDStepsTestCase
public DDStepsTestCase()(Code)
Standard, no args constructor.

The JUnit contract dictates that if no constructor with a String (name) argument i sfound, this no-args constructor is used, and then setName() is called. That is how TestSuite works, anyway, and that's the way we like it. Our (@link #setName(String)) can then get the behaviour, if needed.





Method Detail
countTestCases
final public int countTestCases()(Code)
Delegate to behaviour.
See Also:   junit.framework.TestCase.countTestCases



createDataLoader
abstract protected DataLoader createDataLoader()(Code)
Factory Method: You as a user of DDSteps must implement this. You should return the data loader that you want to use to load the test data. Usually, a DataLoaders would be stateless, so not creating a new instance every time, but rather using a single instance would make sense. The stateless dataloaders provided by DDSteps have an easy-to-use INSTANCE static field, please use that.

It is recommended that you yourself create one (or more) base class for all your test cases, and implement this method there, as you will probably use the same kind of data loader for all your DDSteps testcases.

In fact, there are even some utility base classes for you, so that you don't subclass this class directly.

TODO Add see to util classes Don't return null.
See Also:   org.ddsteps.data.support.DataLoaderFactory.getCachingExcelDataLoader




getBehaviour
DdBehaviour getBehaviour()(Code)
The appropriate behaviour for this test case instance, given the name.

This method should not be used or overridden, it is strictly internal in DDSteps. A behaviour, never null.




getName
final public String getName()(Code)
Returns the full, data driven name, such as testMethod[Rox 13].

Some tools, especially eclipse, will use this to display and to recreate the testcase.
See Also:   junit.framework.TestCase.getName




run
final public void run(TestResult result)(Code)
Delegate to behaviour.
See Also:   junit.framework.TestCase.run(junit.framework.TestResult)



setName
final public void setName(String name)(Code)
Overrides setName to handle DDSteps "data driven" names, such as testMethod[Row 13].

Overriding this method is the only way we can make sure that the name is always handled correctly.

The name can be either that of the test method (i.e. testFoo), or an indexed name (i.e. testFoo[Row X]. The contents of the bracket is up to the DataLoader to interpret, but it indicates that this is a row instance, not the testMethod instance.
See Also:   junit.framework.TestCase.setName(java.lang.String)




setUp
final public void setUp() throws Exception(Code)
Delegate to behaviour.
See Also:   junit.framework.TestCase.setUp



setUpAfterData
public void setUpAfterData() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.setUpAfterData



setUpBeforeData
public void setUpBeforeData() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.setUpBeforeData



setUpMethod
public void setUpMethod() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.setUpMethod



tearDown
final public void tearDown() throws Exception(Code)
Delegate to behaviour.
See Also:   junit.framework.TestCase.tearDown



tearDownAfterData
public void tearDownAfterData() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.tearDownAfterData



tearDownBeforeData
public void tearDownBeforeData() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.tearDownBeforeData



tearDownMethod
public void tearDownMethod() throws Exception(Code)
Override this in your subclass, if desired.
throws:
  Exception -
See Also:   org.ddsteps.junit.behaviour.DdBehaviourCallbackHandler.tearDownMethod



toString
public String toString()(Code)
Not the same toString as JUnit, instead use a javadoc style syntax.
See Also:   java.lang.Object.toString



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