new SegmentGridInstanceMock(
"segmentGridInstanceMock", expectations,
NDimensionalIndex.ZERO_DIMENSIONS);
final SegmentGridMock segmentGridMock =
LayoutTestHelper.createSegmentGridMock(
"segmentGridMock", expectations, montageLayoutMock,
ROWS, COLUMNS);
final SegmentGridAttributesMock segmentGridAttributesMock =
(SegmentGridAttributesMock)
AttributesTestHelper.createMockAttributes(
SegmentGridAttributesMock.class, "montage",
"segmentGridAttributesMock", expectations);
final FormatInstanceMock childInstanceMock =
new FormatInstanceMock("childInstanceMock", expectations,
NDimensionalIndex.ZERO_DIMENSIONS);
// =====================================================================
// Set Expectations
// =====================================================================
// Initialise the grid rows and columns.
LayoutTestHelper.initialiseRows(segmentGridMock, ROW_STYLE_CLASS);
LayoutTestHelper.initialiseColumns(segmentGridMock, COLUMN_STYLE_CLASS);
// Initialise the format context.
final FormatMock childMock = (FormatMock) segmentGridMock.getChildAt(0);
// Create an association between the child instance and its format.
FormatRendererTestHelper.connectFormatInstanceToFormat(
formatRendererContextMock,