Java Doc for BaseStepTestCase.java in  » Testing » webtest » com » canoo » webtest » steps » 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 » webtest » com.canoo.webtest.steps 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.canoo.webtest.steps.BaseStepTestCase

All known Subclasses:   com.canoo.webtest.steps.request.SelectWebClientTest,  com.canoo.webtest.extension.groovy.GroovyStepTest,  com.canoo.webtest.extension.StoreLinkParameterTest,  com.canoo.webtest.steps.verify.AbstractVerifyFormTest,  com.canoo.webtest.extension.StoreResponseCodeTest,  com.canoo.webtest.steps.request.SelectWindowTest,  com.canoo.webtest.extension.BaseFilterTestCase,  com.canoo.webtest.steps.store.StoreXPathTest,  com.canoo.webtest.plugins.pdftest.AbstractBaseVerifyPdfTestCase,  com.canoo.webtest.extension.StoreRandomTest,  com.canoo.webtest.steps.request.ClickLinkTest,  com.canoo.webtest.steps.StepTest,  com.canoo.webtest.steps.request.AbstractTargetActionTest,  com.canoo.webtest.steps.verify.VerifyElementTest,  com.canoo.webtest.steps.request.FollowFrameTest,  com.canoo.webtest.extension.EnableJavaScriptTest,  com.canoo.webtest.extension.ForceInputFieldAttributeTest,  com.canoo.webtest.steps.verify.VerifyXPathTest,  com.canoo.webtest.extension.ForceHiddenInputFieldTest,  com.canoo.webtest.steps.form.SetFileFieldTest,  com.canoo.webtest.plugins.pdftest.AbstractVerifyPdfStepTest,  com.canoo.webtest.steps.verify.VerifyTextTest,  com.canoo.webtest.plugins.emailtest.BaseEmailTestCase,  com.canoo.webtest.steps.request.InvokePageTest,  com.canoo.webtest.steps.verify.VerifyInputFieldTest,  com.canoo.webtest.extension.StoreInputFieldAttributeTest,  com.canoo.webtest.steps.verify.VerifyLinksTest,  com.canoo.webtest.extension.ScriptStepTest,  com.canoo.webtest.steps.store.StoreCookieTest,  com.canoo.webtest.steps.AbstractStepContainerTest,  com.canoo.webtest.steps.verify.VerifyPropertyTest,  com.canoo.webtest.plugins.exceltest.BaseExcelStepTestCase,  com.canoo.webtest.steps.verify.VerifyTitleTest,  com.canoo.webtest.steps.form.SetSelectFieldTest,  com.canoo.webtest.extension.StoreElementAttributeTest,  com.canoo.webtest.extension.VerifyLinkedContentTest,  com.canoo.webtest.steps.store.StoreHeaderTest,  com.canoo.webtest.ant.TestStepSequenceTest,  com.canoo.webtest.extension.dialogs.ExpectDialogTest,  com.canoo.webtest.steps.store.StorePropertyStepTest,  com.canoo.webtest.steps.verify.VerifyElementTextTest,  com.canoo.webtest.extension.MyCustomStepTest,  com.canoo.webtest.steps.form.SetInputFieldTest,  com.canoo.webtest.steps.TestInfoStepTest,  com.canoo.webtest.plugins.emailtest.EmailSetConfigTest,  com.canoo.webtest.steps.verify.AbstractVerifyTextTest,  com.canoo.webtest.steps.control.BaseWrappedStepTestCase,  com.canoo.webtest.steps.verify.VerifySelectFieldTest,  com.canoo.webtest.extension.applet.AppletRunnerStepTest,  com.canoo.webtest.steps.request.ClickElementTest,  com.canoo.webtest.steps.form.SelectFormTest,  com.canoo.webtest.extension.dialogs.VerifyNoDialogsTest,  com.canoo.webtest.steps.verify.VerifyCookieTest,  com.canoo.webtest.steps.store.StoreRegExMatchTest,
BaseStepTestCase
abstract public class BaseStepTestCase extends RMockTestCase (Code)
Tests that are common for all Steps, especially parameter handling.
author:
   Marc Guillemot
author:
   Denis N. Antonioli
author:
   Paul King


Field Summary
final public static  StringMOCK_TO_STRING
     The minimal string to have the verification of toString pass.
final protected static  StringNO_CURRENT_RESPONSE
    


Method Summary
protected  ThrowableassertErrorOnExecute(Step step, String failMessage, String exceptionMessagePrefix)
    
protected  ThrowableassertErrorOnExecute(Step step)
    
protected  voidassertErrorOnExecuteIfCurrentPageIsXml(Step step)
    
protected  ThrowableassertFailOnExecute(Step step, String failMessage, String exceptionMessagePrefix)
    
protected  ThrowableassertFailOnExecute(Step step)
    
public static  voidassertInstanceOf(Class expected, Object actual)
    
protected static  voidassertStepRejectsEmptyParam(String param, TestBlock b)
    
protected static  voidassertStepRejectsNullParam(String param, TestBlock b)
    
protected  voidassertStepRejectsNullResponse(Step step)
    
protected  voidassertStepRejectsNullResponseFile(Step step)
    
protected  ThrowableassertThrowOnExecute(Step step, String failMessage, String exceptionMessagePrefix, Class throwable)
    
protected static  voidcheckResponseMessage(String expectedMessage, String message)
    
protected  StepconfigureStep(Step step)
     Configures the step a la webtest, setting the properties ant/webtest would have set on it before executing it (Project, Context, ...).
protected  TaskconfigureTask(Task task)
     Configures the task a la ant, setting the properties ant would have set on it before executing it (Project, Target, ...).
final protected  StepcreateAndConfigureStep()
    
protected  ContextStubcreateContext()
    
abstract protected  StepcreateStep()
     Concrete test classes should return the Step they want to test.
public static  voidexecuteStep(Step step)
     Use this method to execute a step. The method duplicates the content of Step.execute , but without error handling and without notification.
protected  ContextStubgetContext()
    
public static  ContextStubgetContextForDocument(String documentText)
    
protected  HtmlPagegetDummyPage()
    
protected  HtmlPagegetDummyPage(String content)
    
protected  PagegetDummyPage(String content, String contentType)
    
protected static  TestBlockgetExecuteStepTestBlock(Step step)
     Gets a test block calling BaseStepTestCase.executeStep(Step) with the provided step.
protected  TestBlockgetExecuteStepTestBlock()
     Gets a test block calling BaseStepTestCase.executeStep(Step) on BaseStepTestCase.getStep() .
protected  ProjectgetProject()
    
final protected  StepgetStep()
     Gets the step beeing tested.
protected  voidsetFakedContext(ContextStub context)
    
protected  voidsetUp()
     Creates the context and the Step under test calling BaseStepTestCase.createStep() .
protected  voidtearDown()
    
public  voidtestAssertInstanceOf()
    
protected  voidtestNestedTextEquivalent(Step step, String propertyName)
     Test that calling addText(String) on the step sets the specified property.
public  voidtestToString()
    
public  voidtestUnknownPropertyType()
    

Field Detail
MOCK_TO_STRING
final public static String MOCK_TO_STRING(Code)
The minimal string to have the verification of toString pass. Useful for simplistic implmentation of abstract class.



NO_CURRENT_RESPONSE
final protected static String NO_CURRENT_RESPONSE(Code)





Method Detail
assertErrorOnExecute
protected Throwable assertErrorOnExecute(Step step, String failMessage, String exceptionMessagePrefix)(Code)
the thrown exception



assertErrorOnExecute
protected Throwable assertErrorOnExecute(Step step)(Code)
the thrown exception



assertErrorOnExecuteIfCurrentPageIsXml
protected void assertErrorOnExecuteIfCurrentPageIsXml(Step step)(Code)



assertFailOnExecute
protected Throwable assertFailOnExecute(Step step, String failMessage, String exceptionMessagePrefix)(Code)

Parameters:
  failMessage -
Parameters:
  exceptionMessagePrefix - the thrown exception



assertFailOnExecute
protected Throwable assertFailOnExecute(Step step)(Code)
the thrown exception



assertInstanceOf
public static void assertInstanceOf(Class expected, Object actual)(Code)



assertStepRejectsEmptyParam
protected static void assertStepRejectsEmptyParam(String param, TestBlock b)(Code)



assertStepRejectsNullParam
protected static void assertStepRejectsNullParam(String param, TestBlock b)(Code)



assertStepRejectsNullResponse
protected void assertStepRejectsNullResponse(Step step)(Code)



assertStepRejectsNullResponseFile
protected void assertStepRejectsNullResponseFile(Step step) throws Exception(Code)



assertThrowOnExecute
protected Throwable assertThrowOnExecute(Step step, String failMessage, String exceptionMessagePrefix, Class throwable)(Code)
the thrown exception



checkResponseMessage
protected static void checkResponseMessage(String expectedMessage, String message)(Code)



configureStep
protected Step configureStep(Step step)(Code)
Configures the step a la webtest, setting the properties ant/webtest would have set on it before executing it (Project, Context, ...).
Parameters:
  step - the step to configure the configured step



configureTask
protected Task configureTask(Task task)(Code)
Configures the task a la ant, setting the properties ant would have set on it before executing it (Project, Target, ...).
Parameters:
  task - the task to configure the configured task



createAndConfigureStep
final protected Step createAndConfigureStep()(Code)
Creates a new step using BaseStepTestCase.createStep() and sets the current context on it the step



createContext
protected ContextStub createContext()(Code)
Creates the context that will be created in BaseStepTestCase.setUp() , available through BaseStepTestCase.getContext() and set on the step created with BaseStepTestCase.createStep() the context



createStep
abstract protected Step createStep()(Code)
Concrete test classes should return the Step they want to test. The step is created during BaseStepTestCase.setUp() and the context is set on it to BaseStepTestCase.getContext() the tested step.



executeStep
public static void executeStep(Step step) throws Exception(Code)
Use this method to execute a step. The method duplicates the content of Step.execute , but without error handling and without notification. It assumes the context is already set.
Parameters:
  step - The step to execute.
throws:
  Exception -



getContext
protected ContextStub getContext()(Code)



getContextForDocument
public static ContextStub getContextForDocument(String documentText)(Code)



getDummyPage
protected HtmlPage getDummyPage()(Code)
Gets a html page with a very basic content the page



getDummyPage
protected HtmlPage getDummyPage(String content)(Code)
Gets a html page with the given content



getDummyPage
protected Page getDummyPage(String content, String contentType)(Code)
Gets a page with the given content and content type



getExecuteStepTestBlock
protected static TestBlock getExecuteStepTestBlock(Step step)(Code)
Gets a test block calling BaseStepTestCase.executeStep(Step) with the provided step. the test block



getExecuteStepTestBlock
protected TestBlock getExecuteStepTestBlock()(Code)
Gets a test block calling BaseStepTestCase.executeStep(Step) on BaseStepTestCase.getStep() . the test block



getProject
protected Project getProject()(Code)
Gets the project used for the current test the project



getStep
final protected Step getStep()(Code)
Gets the step beeing tested. This should not be called during class initialisation because a new instance is created before each test execution. the currently tested step created during BaseStepTestCase.setUp() by BaseStepTestCase.createStep().



setFakedContext
protected void setFakedContext(ContextStub context) throws IOException(Code)



setUp
protected void setUp() throws Exception(Code)
Creates the context and the Step under test calling BaseStepTestCase.createStep() .
See Also:   junit.framework.TestCase.setUp



tearDown
protected void tearDown() throws Exception(Code)



testAssertInstanceOf
public void testAssertInstanceOf()(Code)



testNestedTextEquivalent
protected void testNestedTextEquivalent(Step step, String propertyName) throws Exception(Code)
Test that calling addText(String) on the step sets the specified property.
Parameters:
  step - the step
Parameters:
  propertyName - the property that addText is expected to fill
throws:
  Exception -



testToString
public void testToString()(Code)



testUnknownPropertyType
public void testUnknownPropertyType()(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.