Java Doc for DDTTestCase.java in  » Testing » DDTUnit » junitx » ddtunit » 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 » DDTUnit » junitx.ddtunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


junitx.ddtunit.DDTTestCase

All known Subclasses:   junitx.ddtunit.SpecificationAssertTest,  junitx.ddtunit.functest.ProcessMapTypeTest,  junitx.ddtunit.functest.ProcessObjectReferenceTest,  junitx.ddtunit.functest.ProcessConstructorValuesTest,  junitx.ddtunit.usecases.UserBeanTest,  junitx.ddtunit.functest.ProcessGenericValuesTest,  junitx.ddtunit.functest.ProcessComparableDataTest,  junitx.ddtunit.functest.ProcessCollectionTypeTest,  junitx.ddtunit.functest.ProcessDateDataTest,  junitx.ddtunit.data.db.DbRepositoryAccessTest,  junitx.ddtunit.functest.ProcessMethodCallValuesTest,  junitx.ddtunit.ActualTest,  junitx.ddtunit.functest.CollectionContainerModifierTest,  junitx.ddtunit.functest.ProcessStringDataTest,  junitx.ddtunit.functest.ProcessBeansValuesTest,  junitx.ddtunit.SimpleDDTUnitTest,  junitx.ddtunit.functest.ProcessSetTypeTest,  junitx.ddtunit.data.ObjectAsserterTest,  junitx.ddtunit.functest.ProcessConstantValuesTest,  junitx.ddtunit.functest.ProcessArrayDataTest,  junitx.ddtunit.data.processing.TypeAbbreviatorTest,  junitx.ddtunit.XmlEntityResourceTest,  junitx.ddtunit.data.processing.ProcessClassGlobalObjectsTest,  junitx.ddtunit.XmlEntityTest,  junitx.ddtunit.functest.ProcessExpectedExceptionTest,  junitx.ddtunit.data.VerifyTestOrderExecutionTest,
DDTTestCase
abstract public class DDTTestCase extends TestCase (Code)
This class is derived from TestCase from JUnit.
It will implement all neccessary features to run tests based on xml parameter data.
author:
   jg


Field Summary
 TestClusterDataSetclassDataSet
    

Constructor Summary
public  DDTTestCase()
    
public  DDTTestCase(String name)
    

Method Summary
protected  voidaddObjectToAssert(String assertId, Object object)
    
protected  voidassertObject(String assertId, Object obj)
     Directly assert expected against actual object during method execution.
protected  voidassertObject(String assertId, Object obj, boolean mark)
     Directly assert expected against actual object during method execution.
public  intcountMethodTests()
     Count number of test datasets provided for method methodName.
protected  ObjectgetGlobalObject(String objectId)
     Retrieve object with specified identifier on a per class basis.
protected  ObjectgetGlobalObject(String objectId, String objectType)
     Retrieve object with specified identifier on a per class basis.
protected  ObjectgetObject(String objectId)
     Retrieve object with specified identifier on a per method-test basis.
protected  ObjectgetObject(String objectId, String objectType)
     Retrieve object with specified identifier on a per method-test basis.
protected  ObjectgetResourceObject(String objectId)
     Retrieve object with specified identifier on class independend basis.
protected  ObjectgetResourceObject(String objectId, String objectType)
     Retrieve object with specified identifier on class independend basis.
public  StringgetTestName()
    
abstract protected  voidinitContext()
     Implement method for initializing test context.
protected  voidinitTestData(String classId)
     Initialize xml test data for specified classId in resource associagted to same name as classId using ResourceNameFactory .
protected  voidinitTestData(String resource, String classId)
    
public  TestResultrun()
     Run complete selected testmethod by generating a separate result und return this after execution.
public  voidrun(TestResult result)
     Run complete selected testmethod by generating a separate result und return this after execution.
public  voidrunBare()
     Run a bare method cycle as defined in JUnit.
public  StringrunInfo()
    
protected  voidrunMethodTest()
     Execute the testmethod without extra setUp and tearDown methods and no hooks to TestListener classes like TestRunner.
protected  voidrunTest()
     Do not use this method to define tests.
public  voidsetTestName(String testName)
    
protected  voidvalidateAsserts(boolean assertSupport)
     Validate all assertions concerning the active method-test dataset.

Field Detail
classDataSet
TestClusterDataSet classDataSet(Code)




Constructor Detail
DDTTestCase
public DDTTestCase()(Code)



DDTTestCase
public DDTTestCase(String name)(Code)

Parameters:
  name - of testmethod to execute




Method Detail
addObjectToAssert
protected void addObjectToAssert(String assertId, Object object)(Code)
Add object to make assertion against assert definition identified by assertId
Parameters:
  assertId - to identify assert
Parameters:
  object - used as actual object against expected object defined inassertion



assertObject
protected void assertObject(String assertId, Object obj)(Code)
Directly assert expected against actual object during method execution. Do not wait till the end of test execution.
Parameters:
  assertId - to retrieve expected assert
Parameters:
  obj - to assert against expected value



assertObject
protected void assertObject(String assertId, Object obj, boolean mark)(Code)
Directly assert expected against actual object during method execution. Do not wait till the end of test execution.
Parameters:
  assertId - to retrieve expected assert
Parameters:
  obj - to assert against expected value
Parameters:
  mark - true if validation should be marked as executed



countMethodTests
public int countMethodTests()(Code)
Count number of test datasets provided for method methodName.
If dataset for this method is null, 1 will be returned (a standard JUnit method) Count of tests under method methodName



getGlobalObject
protected Object getGlobalObject(String objectId)(Code)
Retrieve object with specified identifier on a per class basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getGlobalObject
protected Object getGlobalObject(String objectId, String objectType)(Code)
Retrieve object with specified identifier on a per class basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getObject
protected Object getObject(String objectId)(Code)
Retrieve object with specified identifier on a per method-test basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getObject
protected Object getObject(String objectId, String objectType)(Code)
Retrieve object with specified identifier on a per method-test basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getResourceObject
protected Object getResourceObject(String objectId)(Code)
Retrieve object with specified identifier on class independend basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getResourceObject
protected Object getResourceObject(String objectId, String objectType)(Code)
Retrieve object with specified identifier on class independend basis.
If no data exists an exception will be raised.
Parameters:
  objectId - specifies key for retrieval Object that is stored under identifier key



getTestName
public String getTestName()(Code)



initContext
abstract protected void initContext()(Code)
Implement method for initializing test context. Especially retrieving test data resource.
The easies way to do this is just to use the following code snipplet:
 void initContext() {
 initTestData("/mySpecialResource.xml", "ClassIdInResourceToUse");
 }
 



initTestData
protected void initTestData(String classId)(Code)
Initialize xml test data for specified classId in resource associagted to same name as classId using ResourceNameFactory .
Parameters:
  resource - of xml based test data



initTestData
protected void initTestData(String resource, String classId)(Code)
Initialize xml test data for specified classId in resource
Parameters:
  resource - of xml based test data
Parameters:
  classId - of test data to process



run
public TestResult run()(Code)
Run complete selected testmethod by generating a separate result und return this after execution. This contains all notification hooks to TestListener classes like TestRunner. result of executed test



run
public void run(TestResult result)(Code)
Run complete selected testmethod by generating a separate result und return this after execution. This contains all notification hooks to TestListener classes like TestRunner.
Parameters:
  result - object generated externally, by a testrunner e.g..



runBare
public void runBare() throws Throwable(Code)
Run a bare method cycle as defined in JUnit. Here the testdata initialization is performed. Because every testmethod should be run under its own fixture the execution of setUp and tearDown is inside of a subroutine. These methods will be executed inside of around every test representation of xml testdata definition.
throws:
  Throwable - that might come up during testmethod execution.



runInfo
public String runInfo()(Code)
Information about actual run test



runMethodTest
protected void runMethodTest() throws Throwable(Code)
Execute the testmethod without extra setUp and tearDown methods and no hooks to TestListener classes like TestRunner.
This method contains the iteration over the xml defined tests per method.
throws:
  Throwable - on any exception that occures



runTest
protected void runTest()(Code)
Do not use this method to define tests. Use test<name>() instead.



setTestName
public void setTestName(String testName)(Code)



validateAsserts
protected void validateAsserts(boolean assertSupport)(Code)
Validate all assertions concerning the active method-test dataset. All asserts that are not marked as allready processed are validated and marked as processed.



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