@Test public void testGetHeightWithoutHasDynamicHeightCell() { final GridRow row = spy(new LiteralExpressionGridRow()); final Map<Integer, GridCell> cells = new HashMap<Integer, GridCell>() {{ put(0, new BaseGridCell<>(new BaseGridCellValue<>("cheese"))); }}; doReturn(cells).when(row).getCells(); assertThat(row.getHeight()).isEqualTo(DEFAULT_HEIGHT); }
@Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; }
LiteralExpressionGridRow extends BaseGridRow { @Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; } }
LiteralExpressionGridRow extends BaseGridRow { @Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; } LiteralExpressionGridRow(); }
LiteralExpressionGridRow extends BaseGridRow { @Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; } LiteralExpressionGridRow(); @Override double getHeight(); }
LiteralExpressionGridRow extends BaseGridRow { @Override public double getHeight() { double height = DEFAULT_HEIGHT; for (GridCell<?> cell : this.getCells().values()) { if (cell instanceof HasDynamicHeight) { height = Math.max(((HasDynamicHeight) cell).getHeight(), height); } } return height; } LiteralExpressionGridRow(); @Override double getHeight();  }