DOMFactoryMock domFactoryMock = new DOMFactoryMock(
"domFactory", expectations);
domFactoryMock.expects.createElement().returns(null);
DOMOutputBufferMock outputBuffer = new DOMOutputBufferMock(
"outputBuffer", expectations, domFactoryMock);
protocolMock
.expects.getOutputBufferFactory()
.returns(outputBufferFactoryMock);
pageCtxMock
.fuzzy.pushDeviceLayoutContext(
mockFactory.expectsInstanceOf(DeviceLayoutContext.class));
RegionInstanceMock regionMock
= new RegionInstanceMock("regionMock", expectations,
NDimensionalIndex.ZERO_DIMENSIONS);
pageCtxMock
.fuzzy.getFormatInstance(
mockFactory.expectsInstanceOf(Format.class),
NDimensionalIndex.ZERO_DIMENSIONS)
.returns(regionMock);
pageCtxMock
.expects.pushContainerInstance(regionMock);
regionMock
.expects.getCurrentBuffer()
.returns(outputBuffer).any();
pageCtxMock
.expects.pushOutputBuffer(outputBuffer);
// Called during callOpenOnProtocol
moduleMock = new WidgetModuleMock(
"moduleMock", expectations);
protocolMock
.expects.getWidgetModule()
.returns(moduleMock).fixed(2);
rendererMock = new WizardRendererMock(
"rendererMock", expectations);
moduleMock
.expects.getWizardRenderer()
.returns(rendererMock);
rendererMock
.fuzzy.renderOpen(
protocolMock,
mockFactory.expectsInstanceOf(WizardAttributes.class));
// Called during callCloseOnProtocol
moduleMock
.fuzzy.getWidgetRenderer(
mockFactory.expectsInstanceOf(WizardAttributes.class))
.returns(rendererMock);
rendererMock
.fuzzy.renderClose(
protocolMock,
mockFactory.expectsInstanceOf(WizardAttributes.class));
// Called during doElementEnd
pageCtxMock.expects.popContainerInstance(regionMock);
pageCtxMock
.expects.popOutputBuffer(outputBuffer);
DeviceLayoutContextMock deviceLayoutCtxMock =
new DeviceLayoutContextMock("deviceLayoutCtxMock", expectations);
pageCtxMock
.expects.getDeviceLayoutContext()
.returns(deviceLayoutCtxMock);
pageCtxMock
.expects.popDeviceLayoutContext()
.returns(null);
domFactoryMock.expects.createElement().returns(null);
DOMOutputBufferMock currentBuffer = new DOMOutputBufferMock(
"currentBuffer", expectations, domFactoryMock);
containerInstanceMock
.expects.getCurrentBuffer()