Java Doc for InterfaceTestSuite.java in  » Test-Coverage » GroboUtils » net » sourceforge » groboutils » junit » v1 » iftc » 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 » Test Coverage » GroboUtils » net.sourceforge.groboutils.junit.v1.iftc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestSuite

InterfaceTestSuite
public class InterfaceTestSuite extends TestSuite (Code)
Allows for tests to be written on interfaces or abstract classes. These must be run through an InterfaceTestSuite to have the implemented object be set correctly.

This class extends TestSuite only for the purpose of being a testing repository. The act of parsing TestCase classes is delegated to new TestSuite instances. A new instance will be created for each test method (just as TestSuite does), If a TestCase class has a constructor which is of the form ( String, ImplFactory ), then each test method instance will be created once for each known ImplFactory object; these will be stored and executed through the ImplFactory class. All other classes will be added just as TestSuite does (the standard method).

The creation of test instances is delayed until the tests are actually retrieved via the testAt(), tests(), and testCount() methods. Therefore, adding new Classes and ImplFactory instances after the creation time will cause an error, due to problems with addTest() (they cannot be removed).

Currently, this class is slow: it does not do smart things like cache results from inspection on the same class object.
author:
   Matt Albrecht groboclown@users.sourceforge.net
version:
   $Date: 2003/02/10 22:52:20 $
since:
   March 2, 2002
See Also:   InterfaceTestCase
See Also:   ImplFactory
See Also:   junit.framework.TestSuite



Field Summary
 Vectorclasses
    
 Vectorcreators
    

Constructor Summary
public  InterfaceTestSuite()
     Constructs a TestSuite from the given class, and sets the initial set of creators.
public  InterfaceTestSuite(Class theClass)
     Constructs a TestSuite from the given class, and sets the initial set of creators.
public  InterfaceTestSuite(Class theClass, ImplFactory f)
     Constructs a TestSuite from the given class, and sets the initial set of creators.

Method Summary
public  voidaddFactories(ImplFactory f)
     Add an array of new Implementation factories to the suite.
public  voidaddFactory(ImplFactory f)
     Add a new Implementation factory to the suite.
public  voidaddInterfaceTestSuite(InterfaceTestSuite t)
     Add an InterfaceTestSuite to this suite.
public  voidaddTestSuite(Class theClass)
     Adds all the methods starting with "test" as test cases to the suite.
public  voidaddTests(Test[] t)
     Add an array of tests to the suite.
protected  ITestCreatorcreateTestCreator(Vector vf)
     Create a TestCreator that contains the knowledge of how to properly parse and generate tests for all types of supported test classes.
Parameters:
  factories - a vector of ImplFactory instances to load Interfacetest class instances.
protected  voidloadTestSuite(Class testClass, TestClassCreator tcc)
     Load all the tests and warnings from the class and the creator type into this instance's suite of tests.
protected  voidloadTestSuites()
     Load all the tests from the cache of classes and factories.
public  TesttestAt(int index)
    
public  inttestCount()
    
public  Enumerationtests()
    

Field Detail
classes
Vector classes(Code)



creators
Vector creators(Code)




Constructor Detail
InterfaceTestSuite
public InterfaceTestSuite()(Code)
Constructs a TestSuite from the given class, and sets the initial set of creators. Adds all the methods starting with "test" as test cases to the suite.



InterfaceTestSuite
public InterfaceTestSuite(Class theClass)(Code)
Constructs a TestSuite from the given class, and sets the initial set of creators. Adds all the methods starting with "test" as test cases to the suite.
Parameters:
  theClass - the class under inspection



InterfaceTestSuite
public InterfaceTestSuite(Class theClass, ImplFactory f)(Code)
Constructs a TestSuite from the given class, and sets the initial set of creators. Adds all the methods starting with "test" as test cases to the suite.
Parameters:
  theClass - the class under inspection
Parameters:
  f - a factory to add to this suite.




Method Detail
addFactories
public void addFactories(ImplFactory f)(Code)
Add an array of new Implementation factories to the suite. This should only be called before any tests are extracted from this suite.
Parameters:
  f - a set of factories to add to this suite.
exception:
  IllegalArgumentException - if f is null, orany element in the list is null
exception:
  IllegalStateException - if the tests have already been generated



addFactory
public void addFactory(ImplFactory f)(Code)
Add a new Implementation factory to the suite. This should only be called before any tests are extracted from this suite. If it is called after, then an IllegalStateException will be generated.
Parameters:
  f - a factory to add to this suite.
exception:
  IllegalArgumentException - if f is null
exception:
  IllegalStateException - if the tests have already been generated



addInterfaceTestSuite
public void addInterfaceTestSuite(InterfaceTestSuite t)(Code)
Add an InterfaceTestSuite to this suite. If an interface extends another interface, it should add it's super interface's test suite through this method. The same goes for any abstract or base class. Adding the parent suite through this method will cause both suites to share creators. In fact, the parent suite cannot have any factories when passed into this method, because they will be ignored.

This allows for the flexibility of determining whether to add a full test suite, without sharing factories, or not.
Parameters:
  t - a test to add to the suite. It can be null.




addTestSuite
public void addTestSuite(Class theClass)(Code)
Adds all the methods starting with "test" as test cases to the suite.

Overrides the parent implementation to allow for InterfaceTests.
Parameters:
  theClass - the class under inspection
exception:
  IllegalArgumentException - if theClass is null
exception:
  IllegalStateException - if the tests have already been generated




addTests
public void addTests(Test[] t)(Code)
Add an array of tests to the suite.
Parameters:
  t - a set of tests to add to this suite.
Parameters:
  IllegalArgumentException - if t is null



createTestCreator
protected ITestCreator createTestCreator(Vector vf)(Code)
Create a TestCreator that contains the knowledge of how to properly parse and generate tests for all types of supported test classes.
Parameters:
  factories - a vector of ImplFactory instances to load Interfacetest class instances. the new creator.



loadTestSuite
protected void loadTestSuite(Class testClass, TestClassCreator tcc)(Code)
Load all the tests and warnings from the class and the creator type into this instance's suite of tests.
Parameters:
  testClass - the class being inspected for test instancecreation.
Parameters:
  tcc - the creator type that will be used to create new tests.



loadTestSuites
protected void loadTestSuites()(Code)
Load all the tests from the cache of classes and factories.



testAt
public Test testAt(int index)(Code)



testCount
public int testCount()(Code)



tests
public Enumeration tests()(Code)



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