Java Doc for TestController.java in  » J2EE » Expresso » com » jcorporate » expresso » ext » controller » 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 » J2EE » Expresso » com.jcorporate.expresso.ext.controller 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jcorporate.expresso.core.controller.DBController
   com.jcorporate.expresso.ext.controller.TestController

TestController
public class TestController extends DBController implements TestListener(Code)
TestController is a controller that can access and run JUnit unit tests, but from within an Expresso environment (e.g. with the DBConnection pool, Cache, and other Expresso items available, and from a servlet (such as ControllerServlet). This allows tests that require the servlet environment or Expresso components to be executed.
author:
   Michael Nash


Field Summary
final static  StringSUITE_METHODNAME
    
static  intfMaxMessage
    
static  PropertiesfPreferences
    
protected  TestSuiteLoaderfTestLoader
    

Constructor Summary
public  TestController()
    

Method Summary
public synchronized  voidaddError(Test test, Throwable t)
    
public synchronized  voidaddFailure(Test test, Throwable t)
    
public  voidaddFailure(Test test, AssertionFailedError t)
    
protected  voidclearStatus()
     Clears the status message.
protected  TestResultcreateTestResult()
     Creates the TestResult to be used for the test run.
protected synchronized  TestResultdoRun(Test suite, boolean wait)
    
public  StringelapsedTimeAsString(long runTime)
     Returns the formatted string of the elapsed time.
public  voidendTest(Test test)
    
public  StringextractClassName(String className)
    
public static  TestSuiteLoadergetLoader()
     Returns the loader to be used.
public  TestgetTest(String suiteClassName)
     Returns the Test corresponding to the given suite.
public  StringgetTitle()
    
public static  booleaninVAJava()
    
protected  ClassloadSuiteClass(String suiteClassName)
     Returns the loaded Class for a suite name.
public  ControllerResponsenewState(String newState, ControllerRequest params)
     Standard method to select the appropriate next state as the controller moves from state to state.
public synchronized  voidprint(TestResult result)
    
public  voidprintErrors(TestResult result)
    
public  voidprintFailures(TestResult result)
    
public  voidprintHeader(TestResult result)
    
public static  voidrun(Class testClass)
     Runs a suite extracted from a TestCase subclass.
public static  voidrun(Test suite)
     Runs a single test and collects its results.
protected  voidrunFailed(String message)
    
protected  voidrunPromptTestState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunTransition2FormTestState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunTransitionFromFormTestState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunTransitionTestState(ControllerRequest request, ControllerResponse response)
     test a transition to a controller/state note that the ControllerSecurityMatrix output uses the default layout, so the title at the top of that page will show this test controller.
protected synchronized  TestResultstart(String testName)
     Starts a test run.
public synchronized  voidstartTest(Test test)
    
public static  Stringtruncate(String s)
     Truncates a String to the maximum length.

Field Detail
SUITE_METHODNAME
final static String SUITE_METHODNAME(Code)



fMaxMessage
static int fMaxMessage(Code)



fPreferences
static Properties fPreferences(Code)



fTestLoader
protected TestSuiteLoader fTestLoader(Code)




Constructor Detail
TestController
public TestController()(Code)
Default constructor




Method Detail
addError
public synchronized void addError(Test test, Throwable t)(Code)

Parameters:
  test -
Parameters:
  t -



addFailure
public synchronized void addFailure(Test test, Throwable t)(Code)

Parameters:
  test -
Parameters:
  t -



addFailure
public void addFailure(Test test, AssertionFailedError t)(Code)
Added since JUnit 3.7



clearStatus
protected void clearStatus()(Code)
Clears the status message.



createTestResult
protected TestResult createTestResult()(Code)
Creates the TestResult to be used for the test run.



doRun
protected synchronized TestResult doRun(Test suite, boolean wait)(Code)

Parameters:
  suite -
Parameters:
  wait -



elapsedTimeAsString
public String elapsedTimeAsString(long runTime)(Code)
Returns the formatted string of the elapsed time.
Parameters:
  runTime -



endTest
public void endTest(Test test)(Code)

Parameters:
  test -



extractClassName
public String extractClassName(String className)(Code)

Parameters:
  className -



getLoader
public static TestSuiteLoader getLoader()(Code)
Returns the loader to be used.



getTest
public Test getTest(String suiteClassName)(Code)
Returns the Test corresponding to the given suite. This is a template method, subclasses override runFailed(), clearStatus().
Parameters:
  suiteClassName -



getTitle
public String getTitle()(Code)



inVAJava
public static boolean inVAJava()(Code)



loadSuiteClass
protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException(Code)
Returns the loaded Class for a suite name.
Parameters:
  suiteClassName -



newState
public ControllerResponse newState(String newState, ControllerRequest params) throws ControllerException, NonHandleableException(Code)
Standard method to select the appropriate next state as the controller moves from state to state.
Parameters:
  newState -



print
public synchronized void print(TestResult result)(Code)
Prints failures to the log
Parameters:
  result -



printErrors
public void printErrors(TestResult result)(Code)
Prints the errors to the log
Parameters:
  result -



printFailures
public void printFailures(TestResult result)(Code)
Prints failures to the log
Parameters:
  result -



printHeader
public void printHeader(TestResult result)(Code)
Prints the header of the report
Parameters:
  result -



run
public static void run(Class testClass)(Code)
Runs a suite extracted from a TestCase subclass.
Parameters:
  testClass -



run
public static void run(Test suite)(Code)
Runs a single test and collects its results. This method can be used to start a test run from your program.
 public static void main (String[] args) {
 test.textui.TestRunner.run(suite());
 }
 

Parameters:
  suite -



runFailed
protected void runFailed(String message)(Code)

Parameters:
  message -



runPromptTestState
protected void runPromptTestState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
test a transition to a controller/state which requires a form



runTransition2FormTestState
protected void runTransition2FormTestState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
test a transition to a controller/state which requires a form



runTransitionFromFormTestState
protected void runTransitionFromFormTestState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
test a transition from a controller/state which uses a form to one that does not use a form



runTransitionTestState
protected void runTransitionTestState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
test a transition to a controller/state note that the ControllerSecurityMatrix output uses the default layout, so the title at the top of that page will show this test controller.



start
protected synchronized TestResult start(String testName) throws Exception(Code)
Starts a test run. Analyzes the command line arguments and runs the given test suite.
Parameters:
  testName -



startTest
public synchronized void startTest(Test test)(Code)

Parameters:
  test -



truncate
public static String truncate(String s)(Code)
Truncates a String to the maximum length.
Parameters:
  s -



Methods inherited from com.jcorporate.expresso.core.controller.DBController
protected String getString(String stringCode, Object[] args, ControllerRequest myRequest)(Code)(Java Doc)
public static boolean isAllowed(ControllerRequest request, DBController controller, String newState) throws DBException, CacheException(Code)(Java Doc)
public boolean stateAllowed(String newState, ControllerRequest myRequest) throws ControllerException(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.