com.mockobjects.helpers

Class TagTestHelper

public class TagTestHelper extends AbstractServletTestHelper

Sets up mock tag objects in a common configuration. MockHttpServletRequest, MockServletContext and MockHttpSession are attached to MockPageContext

See Also: ; ; ;

Constructor Summary
TagTestHelper(Tag testSubject)
Method Summary
voidassertDoAfterBody(int expectedValue)
Assert that the return value of doAfterBody is equal to an expectedValue
voidassertDoEndTag(int expectedValue)
Assert that the return value of doEndTag is equal to an expectedValue
voidassertDoStartTag(int expectedValue)
Assert that the return value of doStartTag is equal to an expectedValue
MockJspWritergetOutWriter()
MockPageContextgetPageContext()
voidtestDoInitBody()
Invoke doInitBody on the test subject

Constructor Detail

TagTestHelper

public TagTestHelper(Tag testSubject)

Parameters: testSubject The Tag to be tested

Method Detail

assertDoAfterBody

public void assertDoAfterBody(int expectedValue)
Assert that the return value of doAfterBody is equal to an expectedValue

Parameters: expectedValue value to check against doAfterBody

assertDoEndTag

public void assertDoEndTag(int expectedValue)
Assert that the return value of doEndTag is equal to an expectedValue

Parameters: expectedValue value to check against doEndTag

assertDoStartTag

public void assertDoStartTag(int expectedValue)
Assert that the return value of doStartTag is equal to an expectedValue

Parameters: expectedValue value to check against doStartTag

getOutWriter

public MockJspWriter getOutWriter()

Returns: The writer use when making calls to PageContext.getOut

getPageContext

public MockPageContext getPageContext()

testDoInitBody

public void testDoInitBody()
Invoke doInitBody on the test subject
Copyright © 2002 Mock Objects. All Rights Reserved.