@Test public void testAddRowMissingColumn() { TableAnswerElement table = new TableAnswerElement(twoKeyTableMetadata); Row row = Row.builder().put("key1", null).build(); _thrown.expect(IllegalArgumentException.class); _thrown.expectMessage( String.format( "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), twoKeyTableMetadata.toColumnMap().keySet())); table.addRow(row); }
public @Nonnull TableAnswerElement addRow(Row row) { checkArgument( row.getColumnNames().equals(_columnNames), "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), _columnNames); _rows.add(row); _rowsList.add(row); return this; }
TableAnswerElement extends AnswerElement { public @Nonnull TableAnswerElement addRow(Row row) { checkArgument( row.getColumnNames().equals(_columnNames), "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), _columnNames); _rows.add(row); _rowsList.add(row); return this; } }
TableAnswerElement extends AnswerElement { public @Nonnull TableAnswerElement addRow(Row row) { checkArgument( row.getColumnNames().equals(_columnNames), "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), _columnNames); _rows.add(row); _rowsList.add(row); return this; } @JsonCreator  TableAnswerElement(@Nonnull @JsonProperty(PROP_METADATA) TableMetadata tableMetadata); }
TableAnswerElement extends AnswerElement { public @Nonnull TableAnswerElement addRow(Row row) { checkArgument( row.getColumnNames().equals(_columnNames), "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), _columnNames); _rows.add(row); _rowsList.add(row); return this; } @JsonCreator  TableAnswerElement(@Nonnull @JsonProperty(PROP_METADATA) TableMetadata tableMetadata); @Nonnull TableAnswerElement addRow(Row row); @Nonnull TableAnswerElement addExcludedRow(Row row, String exclusionName); AnswerSummary computeSummary(Assertion assertion); AnswerSummary computeSummary(Assertion assertion, String notes); boolean evaluateAssertion(Assertion assertion); @JsonProperty(PROP_EXCLUDED_ROWS) List<ExcludedRows> getExcludedRows(); @JsonProperty(PROP_METADATA) TableMetadata getMetadata(); @JsonIgnore Rows getRows(); @JsonProperty(PROP_ROWS) List<Row> getRowsList(); void postProcessAnswer(Question question, Iterable<Row> initialSet); }
TableAnswerElement extends AnswerElement { public @Nonnull TableAnswerElement addRow(Row row) { checkArgument( row.getColumnNames().equals(_columnNames), "Row columns %s do not match metadata columns metadata %s", row.getColumnNames(), _columnNames); _rows.add(row); _rowsList.add(row); return this; } @JsonCreator  TableAnswerElement(@Nonnull @JsonProperty(PROP_METADATA) TableMetadata tableMetadata); @Nonnull TableAnswerElement addRow(Row row); @Nonnull TableAnswerElement addExcludedRow(Row row, String exclusionName); AnswerSummary computeSummary(Assertion assertion); AnswerSummary computeSummary(Assertion assertion, String notes); boolean evaluateAssertion(Assertion assertion); @JsonProperty(PROP_EXCLUDED_ROWS) List<ExcludedRows> getExcludedRows(); @JsonProperty(PROP_METADATA) TableMetadata getMetadata(); @JsonIgnore Rows getRows(); @JsonProperty(PROP_ROWS) List<Row> getRowsList(); void postProcessAnswer(Question question, Iterable<Row> initialSet);  }