| 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 |
Method Summary | |
protected Throwable | assertErrorOnExecute(Step step, String failMessage, String exceptionMessagePrefix) | protected Throwable | assertErrorOnExecute(Step step) | protected void | assertErrorOnExecuteIfCurrentPageIsXml(Step step) | protected Throwable | assertFailOnExecute(Step step, String failMessage, String exceptionMessagePrefix) | protected Throwable | assertFailOnExecute(Step step) | public static void | assertInstanceOf(Class expected, Object actual) | protected static void | assertStepRejectsEmptyParam(String param, TestBlock b) | protected static void | assertStepRejectsNullParam(String param, TestBlock b) | protected void | assertStepRejectsNullResponse(Step step) | protected void | assertStepRejectsNullResponseFile(Step step) | protected Throwable | assertThrowOnExecute(Step step, String failMessage, String exceptionMessagePrefix, Class throwable) | protected static void | checkResponseMessage(String expectedMessage, String message) | protected Step | configureStep(Step step) Configures the step a la webtest, setting the properties ant/webtest would have set on it before executing
it (Project, Context, ...). | protected Task | configureTask(Task task) Configures the task a la ant, setting the properties ant would have set on it before executing
it (Project, Target, ...). | final protected Step | createAndConfigureStep() | protected ContextStub | createContext() | abstract protected Step | createStep() Concrete test classes should return the Step they want to test. | public static void | executeStep(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 ContextStub | getContext() | public static ContextStub | getContextForDocument(String documentText) | protected HtmlPage | getDummyPage() | protected HtmlPage | getDummyPage(String content) | protected Page | getDummyPage(String content, String contentType) | protected static TestBlock | getExecuteStepTestBlock(Step step) Gets a test block calling
BaseStepTestCase.executeStep(Step) with the provided step. | protected TestBlock | getExecuteStepTestBlock() Gets a test block calling
BaseStepTestCase.executeStep(Step) on
BaseStepTestCase.getStep() . | protected Project | getProject() | final protected Step | getStep() Gets the step beeing tested. | protected void | setFakedContext(ContextStub context) | protected void | setUp() Creates the context and the Step under test calling
BaseStepTestCase.createStep() . | protected void | tearDown() | public void | testAssertInstanceOf() | protected void | testNestedTextEquivalent(Step step, String propertyName) Test that calling addText(String) on the step sets the specified property. | public void | testToString() | public void | testUnknownPropertyType() |
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) | | |
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) | | |
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 |
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 - |
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
|
getProject | protected Project getProject()(Code) | | Gets the project used for the current test
the project |
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) | | |
|
|