Java Doc for BaseTestCase.java in  » 6.0-JDK-Modules » j2me » gunit » framework » 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 » 6.0 JDK Modules » j2me » gunit.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


gunit.framework.BaseTestCase

All known Subclasses:   gunit.framework.TestCase,
BaseTestCase
abstract public class BaseTestCase extends junit.framework.TestCase (Code)
BaseTestCase is an abstract class that extends JUnit's TestCase and contains methods that should run on PBP/PP. All profile and optional package specific functionality are defined as abstract methods.

BaseTestCase overrides setUp(), tearDown() and runTest() methods from the base class to provide gunit's Testcase behavioir.



Field Summary
static  TestContainerdefaultTestContainer
    
protected  booleanisAsserted
     Indicates if the testcase asserted using any of the assert functions provided by gunit.
static  String[]refImageDirs
    
static  TestResultVerifierresultVerifier
    
static  TestArgumentstestArgs
    
static  TestFiltertestFilter
    


Method Summary
final protected  voidassertImageEquals()
    
final protected  voidassertImageEquals(Object expected, Object actual)
     Assertion method for image equal operation.
abstract protected  voidassertImageEquals(String message, Object expected, Object actual)
    
abstract protected  voidclearToBackgroundColor(Graphics g, Color c, int x, int y, int w, int h)
    
abstract protected  BufferedImagecreateBufferedImage(int width, int height)
    
protected  ContainercreateContainer()
    
abstract protected  voidencodeImage(BufferedImage image, String filename)
    
final protected  String[]getArguments()
     Returns the arguments for the testcase.
final protected  ContainergetContainer()
    
final protected  GraphicsgetGraphics()
     Returns a Graphics for the graphics testcase to render.
static  String[]getRefImageDirs(String path)
    
final protected  ObjectgetReferenceImage()
     Returns the reference image for the testcase.
final protected  ObjectgetReferenceImage(String fileName)
    
final protected  StringgetReferenceImageFilename()
    
final protected  ObjectgetTestImage()
    
final protected  ImageloadImage(String imageFile)
    
final protected  ImageloadImage(URL url)
    
protected  voidrunTest()
    
protected  voidsetUp()
    
protected  voidtearDown()
    
static  ImagetrackImage(Image img)
    
static  ImagetrackImage(Image img, Component comp)
    
protected  booleanuseBackBuffer()
     Indicates if a back buffer should be used to render the testcase graphics operations.

Field Detail
defaultTestContainer
static TestContainer defaultTestContainer(Code)



isAsserted
protected boolean isAsserted(Code)
Indicates if the testcase asserted using any of the assert functions provided by gunit.



refImageDirs
static String[] refImageDirs(Code)



resultVerifier
static TestResultVerifier resultVerifier(Code)



testArgs
static TestArguments testArgs(Code)



testFilter
static TestFilter testFilter(Code)





Method Detail
assertImageEquals
final protected void assertImageEquals()(Code)
A convenience method that does assertImageEquals(getReferenceImage(),getTestImage())



assertImageEquals
final protected void assertImageEquals(Object expected, Object actual)(Code)
Assertion method for image equal operation.
Parameters:
  expected - the value returned from getReferenceImage()
Parameters:
  actual - the value returned from getTestImage()



assertImageEquals
abstract protected void assertImageEquals(String message, Object expected, Object actual)(Code)
Ensures that the assertion is valid
Parameters:
  message - message for the failure case.
Parameters:
  expected - the value returned from getReferenceImage()
Parameters:
  actual - the value returned from getTestImage()



clearToBackgroundColor
abstract protected void clearToBackgroundColor(Graphics g, Color c, int x, int y, int w, int h)(Code)
Set the background color for the graphics



createBufferedImage
abstract protected BufferedImage createBufferedImage(int width, int height)(Code)
Creates a BufferedImage for the specified width and height with INT_ARGB format



createContainer
protected Container createContainer()(Code)



encodeImage
abstract protected void encodeImage(BufferedImage image, String filename)(Code)
Encode the contents of the BufferedImage with an image compression format (preferably PNG) onto the file specified



getArguments
final protected String[] getArguments()(Code)
Returns the arguments for the testcase. It returns a zero length string if there are no arguments for the testcase



getContainer
final protected Container getContainer()(Code)
Returns the container for the testcase to create GUI artifacts



getGraphics
final protected Graphics getGraphics()(Code)
Returns a Graphics for the graphics testcase to render.



getRefImageDirs
static String[] getRefImageDirs(String path)(Code)



getReferenceImage
final protected Object getReferenceImage()(Code)
Returns the reference image for the testcase.



getReferenceImage
final protected Object getReferenceImage(String fileName)(Code)
Returns the expected image for the fileName relative to the image directory
Parameters:
  fileName - file name relative to the image directory



getReferenceImageFilename
final protected String getReferenceImageFilename()(Code)
Returns the image file name for the testcase



getTestImage
final protected Object getTestImage()(Code)
Returns the image that contains the testcase rendition



loadImage
final protected Image loadImage(String imageFile)(Code)
An utility method that loads an image from a file



loadImage
final protected Image loadImage(URL url)(Code)
An utility method that loads an image from a URL



runTest
protected void runTest() throws Throwable(Code)



setUp
protected void setUp()(Code)



tearDown
protected void tearDown()(Code)



trackImage
static Image trackImage(Image img)(Code)



trackImage
static Image trackImage(Image img, Component comp)(Code)



useBackBuffer
protected boolean useBackBuffer()(Code)
Indicates if a back buffer should be used to render the testcase graphics operations. The default value is true, but the testcase can override to return false,so that screen graphics is used instead of the image buffer



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