// --------------------------------------------------------------------
// Write some content.
// --------------------------------------------------------------------
sharedExpectations.add(new OrderedExpectations() {
public void add() {
// Expect the arbitrator to be consulted and make it use the
// separator.
expectDecide(mockSeparatorArbitrator, separatorManager,
null, mockSeparatorRenderer1,
mockSeparatedContent1, null,
USE_DEFERRED_SEPARATOR);
// Then expect the separator to be rendered.
mockSeparatorRenderer1.expects.render(outputBuffer);
}
});
separatorManager.beforeContent(mockSeparatedContent1);
// --------------------------------------------------------------------
// Render a separator.
// --------------------------------------------------------------------
// No expectations.
separatorManager.queueSeparator(mockSeparatorRenderer2);
// --------------------------------------------------------------------
// Write some content.
// --------------------------------------------------------------------
sharedExpectations.add(new OrderedExpectations() {
public void add() {
// Expect the arbitrator to be consulted and make it use the
// separator.
expectDecide(mockSeparatorArbitrator, separatorManager,
mockSeparatedContent1, mockSeparatorRenderer2,
mockSeparatedContent2, null,
USE_DEFERRED_SEPARATOR);
// Then expect the separator to be rendered.
mockSeparatorRenderer2.expects.render(outputBuffer);
}
});
separatorManager.beforeContent(mockSeparatedContent2);
// --------------------------------------------------------------------
// Render a separator.
// --------------------------------------------------------------------
// No expectations.
separatorManager.queueSeparator(mockSeparatorRenderer1);
// --------------------------------------------------------------------
// Flush pending operations.
// --------------------------------------------------------------------
sharedExpectations.add(new OrderedExpectations() {
public void add() {
// Expect the arbitrator to be consulted and make it use the
// separator.
expectDecide(mockSeparatorArbitrator, separatorManager,