/**
* @see ViewportLayerFixture#DEFAULT_CLIENT_AREA
*/
@Test
public void initBodyLayer() throws Exception {
DefaultGridLayer gridLayer = new GridLayerFixture();
ViewportLayer viewport = gridLayer.getBodyLayer().getViewportLayer();
viewport.setClientAreaProvider(new IClientAreaProvider() {
public Rectangle getClientArea() {
return new Rectangle(0, 0, 160, 80);
}
});
// Client area gets init when this command is fired
gridLayer.doCommand(new InitializeClientAreaCommandFixture());
Assert.assertEquals(160, viewport.getClientAreaWidth());
Assert.assertEquals(80, viewport.getClientAreaHeight());
Assert.assertEquals(160, viewport.getWidth());