final DummyView row = new DummyView();
final DummyView cell1 = new DummyView();
final DummyView cell2 = new DummyView();
row.setupSubviews(new View[] { cell1, cell2 });
final Mockery mockery = new Mockery();
final TableAxis tableAxis = mockery.mock(TableAxis.class);
mockery.checking(new Expectations() {
{
one(tableAxis).getColumnWidth(0);
will(returnValue(80));
one(tableAxis).getColumnWidth(1);
will(returnValue(80));
}
});
final TableRowLayout layout = new TableRowLayout(tableAxis);
layout.layout(row, new Size(200, 200));
mockery.assertIsSatisfied();
Assert.assertEquals(new Size(80, 10), cell1.getSize());
Assert.assertEquals(new Size(80, 10), cell2.getSize());
}