SimpleViewStatusModel implements ViewStatusModel { @Override public Object getRowValueAt(int rowIndex, int columnIndex) { if (rowIndex < 0 || rowIndex >= _rows.size()) { throw new IllegalArgumentException("RowIndex must be in range 0 >= rowIndex < " + _rows.size()); } if (columnIndex < 0 || columnIndex >= getColumnCount()) { throw new IllegalArgumentException("ColumnIndex must be in range 0 >= columnIndex < " + getColumnCount()); } return Iterables.get(Iterables.get(_rows, rowIndex), columnIndex); } SimpleViewStatusModel(List<List<String>> columnHeaders, List<List<Object>> rows, Map<ViewStatusKey, ViewStatus> viewStatusResult); @Override ViewStatus getStatus(ViewStatusKey entry); @Override Set<ViewStatusKey> keySet(); @Override Set<String> getValueRequirementNames(); @Override Set<String> getCurrencies(); @Override Set<String> getComputationTargetTypes(); @Override Set<String> getSecurityTypes(); @Override int getRowCount(); @Override int getColumnCount(); @Override Object getRowValueAt(int rowIndex, int columnIndex); @Override int getHeaderRowCount(); @Override String getColumnNameAt(int rowIndex, int columnIndex);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void getRowValueAtWithNegativeRowIndex() { _viewStatusModel.getRowValueAt(-1, 0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void getRowValueAtWithOutOfRangeRowIndex() { _viewStatusModel.getRowValueAt(5, 0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void getRowValueAtWithNegativeColumnIndex() { _viewStatusModel.getRowValueAt(0, -1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void getRowValueAtWithOutOfRangeColumnIndex() { _viewStatusModel.getRowValueAt(0, 4); }