コード例 #1
0
  public void assertExpected(final Map<Integer, XLSImpCOLCandType> lineNo2xml) {
    //
    // Apply common row expectations, if any
    if (commonRowExpectation != null) {
      for (final XLSImpCOLCandType xml : lineNo2xml.values()) {
        commonRowExpectation.assertExpected(xml);
      }
    }

    Assert.assertFalse("We have at least one expectation defined", rowExpectations.isEmpty());
    for (XLS_OLCand_Row_Expectation expectation : rowExpectations) {
      final int lineNo = expectation.getLineNo();
      final XLSImpCOLCandType xml = lineNo2xml.get(lineNo);
      expectation.assertExpected(xml);
    }
  }
コード例 #2
0
  public void assertExpected(
      final Map<Integer, XLS_OLCand_Row> lineNo2row,
      final Map<Integer, Map<String, Object>> lineNo2rowData) {
    //
    // Apply common row expectations, if any
    if (commonRowExpectation != null) {
      for (final XLS_OLCand_Row row : lineNo2row.values()) {
        commonRowExpectation.assertExpected(row);
      }
    }

    Assert.assertFalse("We have at least one expectation defined", rowExpectations.isEmpty());
    for (XLS_OLCand_Row_Expectation expectation : rowExpectations) {
      final int lineNo = expectation.getLineNo();
      final XLS_OLCand_Row row = lineNo2row.get(lineNo);
      System.out.println("row: " + row);
      System.out.println("row (raw data): " + lineNo2rowData.get(lineNo));
      expectation.assertExpected(row);
    }
  }