TestCase.assertEquals(availRequests.size(), quoteResponses.size());
for (int i = 0; i < availRequests.size(); i++) {
AvailRequest availRequest = (AvailRequest)availRequests.get(i);
PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
if (availRequest.getShipDate() == null) {
TestCase.assertNull(quoteResponse.getShipDate());
} else {
TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
}
TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
availRequest.getRequestedQuantity(),
priceRequest.getPrice(),
availRequest.isQuantityAvail()),
quoteResponse.getTotalCost());
}
}