Java Doc for BuildFileTestA.java in  » Test-Coverage » GroboUtils » org » apache » tools » ant » 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 » org.apache.tools.ant 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.BuildFileTestA

All known Subclasses:   net.sourceforge.groboutils.codecoverage.v2.ant.AntTestA,
BuildFileTestA
abstract public class BuildFileTestA extends TestCase (Code)
(note: name changed from BuildFileTest to ensure the abstract test isn't run). A BuildFileTest is a TestCase which executes targets from an Ant buildfile for testing. This class provides a number of utility methods for particular build file tests which extend this class.
author:
   Nico Seessle
author:
   Conor MacNeill


Field Summary
protected  Projectproject
    

Constructor Summary
public  BuildFileTestA(String name)
    

Method Summary
protected  voidassertLogContaining(String substring)
    
protected  voidassertPropertyEquals(String property, String value)
     assert that a property equals a value; comparison is case sensitive.
protected  voidassertPropertySet(String property)
    
protected  voidassertPropertyUnset(String property)
    
protected  voidconfigureProject(String filename)
    
protected  voidconfigureProject(String filename, int logLevel)
    
protected  voidexecuteTarget(String targetName)
    
protected  voidexpectBuildException(String target, String cause)
    
protected  voidexpectBuildExceptionContaining(String target, String cause, String contains)
    
protected  voidexpectDebuglog(String target, String log)
     Assert that the given message has been logged with a priority >= DEBUG when running the given target.
protected  voidexpectLog(String target, String log)
     Assert that only the given message has been logged with a priority >= INFO when running the given target.
protected  voidexpectLogContaining(String target, String log)
     Assert that the given message has been logged with a priority >= INFO when running the given target.
protected  voidexpectOutput(String target, String output)
    
protected  voidexpectOutputAndError(String target, String output, String error)
    
protected  voidexpectPropertySet(String target, String property, String value)
    
protected  voidexpectPropertySet(String target, String property)
     call a target, verify named property is "true".
protected  voidexpectPropertyUnset(String target, String property)
    
protected  voidexpectSpecificBuildException(String target, String cause, String msg)
    
protected  BuildExceptiongetBuildException()
    
protected  StringgetError()
    
protected  StringgetFullLog()
     Gets the log the BuildFileTest object.
protected  StringgetLog()
     Gets the log the BuildFileTest object.
protected  StringgetOutput()
    
protected  ProjectgetProject()
     Get the project which has been configured for a test.
protected  FilegetProjectDir()
    
protected  URLgetResource(String resource)
     Retrieve a resource from the caller classloader to avoid assuming a vm working directory.

Field Detail
project
protected Project project(Code)




Constructor Detail
BuildFileTestA
public BuildFileTestA(String name)(Code)
Constructor for the BuildFileTest object
Parameters:
  name - string to pass up to TestCase constructor




Method Detail
assertLogContaining
protected void assertLogContaining(String substring)(Code)
Assert that the given substring is in the log messages



assertPropertyEquals
protected void assertPropertyEquals(String property, String value)(Code)
assert that a property equals a value; comparison is case sensitive.
Parameters:
  property - property name
Parameters:
  value - expected value



assertPropertySet
protected void assertPropertySet(String property)(Code)
assert that a property equals "true"
Parameters:
  property - property name



assertPropertyUnset
protected void assertPropertyUnset(String property)(Code)
assert that a property is null
Parameters:
  property - property name



configureProject
protected void configureProject(String filename) throws BuildException(Code)
set up to run the named project
Parameters:
  filename - name of project file to run



configureProject
protected void configureProject(String filename, int logLevel) throws BuildException(Code)
set up to run the named project
Parameters:
  filename - name of project file to run



executeTarget
protected void executeTarget(String targetName)(Code)
execute a target we have set up
Parameters:
  targetName - target to run



expectBuildException
protected void expectBuildException(String target, String cause)(Code)
run a target, expect for any build exception
Parameters:
  target - target to run
Parameters:
  cause - information string to reader of report



expectBuildExceptionContaining
protected void expectBuildExceptionContaining(String target, String cause, String contains)(Code)
run a target, expect an exception string containing the substring we look for (case sensitive match)
Parameters:
  target - target to run
Parameters:
  cause - information string to reader of report
Parameters:
  contains - substring of the build exception to look for



expectDebuglog
protected void expectDebuglog(String target, String log)(Code)
Assert that the given message has been logged with a priority >= DEBUG when running the given target.



expectLog
protected void expectLog(String target, String log)(Code)
Assert that only the given message has been logged with a priority >= INFO when running the given target.



expectLogContaining
protected void expectLogContaining(String target, String log)(Code)
Assert that the given message has been logged with a priority >= INFO when running the given target.



expectOutput
protected void expectOutput(String target, String output)(Code)
execute the target, verify output matches expectations
Parameters:
  target - target to execute
Parameters:
  output - output to look for



expectOutputAndError
protected void expectOutputAndError(String target, String output, String error)(Code)
execute the target, verify output matches expectations and that we got the named error at the end
Parameters:
  target - target to execute
Parameters:
  output - output to look for
Parameters:
  error - Description of Parameter



expectPropertySet
protected void expectPropertySet(String target, String property, String value)(Code)
call a target, verify property is as expected
Parameters:
  target - build file target
Parameters:
  property - property name
Parameters:
  value - expected value



expectPropertySet
protected void expectPropertySet(String target, String property)(Code)
call a target, verify named property is "true".
Parameters:
  target - build file target
Parameters:
  property - property name



expectPropertyUnset
protected void expectPropertyUnset(String target, String property)(Code)
call a target, verify property is null
Parameters:
  target - build file target
Parameters:
  property - property name



expectSpecificBuildException
protected void expectSpecificBuildException(String target, String cause, String msg)(Code)
run a target, wait for a build exception
Parameters:
  target - target to run
Parameters:
  cause - information string to reader of report
Parameters:
  msg - the message value of the build exception we are waiting forset to null for any build exception to be valid



getBuildException
protected BuildException getBuildException()(Code)



getError
protected String getError()(Code)



getFullLog
protected String getFullLog()(Code)
Gets the log the BuildFileTest object. only valid if configureProject() has been called. The log value



getLog
protected String getLog()(Code)
Gets the log the BuildFileTest object. only valid if configureProject() has been called. The log value



getOutput
protected String getOutput()(Code)



getProject
protected Project getProject()(Code)
Get the project which has been configured for a test. the Project instance for this test.



getProjectDir
protected File getProjectDir()(Code)
get the directory of the project the base dir of the project



getResource
protected URL getResource(String resource)(Code)
Retrieve a resource from the caller classloader to avoid assuming a vm working directory. The resource path must be relative to the package name or absolute from the root path.
Parameters:
  resource - the resource to retrieve its url.
throws:
  AssertionFailureException - if resource is not found.



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