public static void checkItemCount(RowItemContainer<?> items, int itemCount) { int numItems = items.getItems().size(); if (numItems != itemCount) { fail("Found " + numItems + " item(s); expected " + itemCount + "."); } }
private static ReprintAddress getFirstReprintAddress( RowItemContainer<Address> addresses, RowItemContainer<ReprintAddress> reprintAddresses, Document document) { Address address = getAddress( addresses.getItems(), FIRST_REPRINT_ADDRESS_CITY, FIRST_REPRINT_ADDRESS_COUNTRY, FIRST_REPRINT_ADDRESS_POSTAL_CODE, FIRST_REPRINT_ADDRESS_RAW_STRING, FIRST_REPRINT_ADDRESS_STATE_OR_PROVINCE, FIRST_REPRINT_ADDRESS_STREET_ADDRESS); return ReprintAddressesTest.getReprintAddress(reprintAddresses.getItems(), document, address); }
private static PublisherAddress getPublisherAddress( RowItemContainer<Address> addresses, RowItemContainer<PublisherAddress> publisherAddresses, Publisher publisher) { Address address = getAddress( addresses.getItems(), PUBLISHER_ADDRESS_CITY, PUBLISHER_ADDRESS_COUNTRY, PUBLISHER_ADDRESS_POSTAL_CODE, PUBLISHER_ADDRESS_RAW_STRING, PUBLISHER_ADDRESS_STATE_OR_PROVINCE, PUBLISHER_ADDRESS_STREET_ADDRESS); return PublisherAddressesTest.getPublisherAddress( publisherAddresses.getItems(), publisher, address); }
private static Publisher getPublisherForTheseTests(RowItemContainer<Publisher> publishers) { return PublisherTest.getPublisher(publishers.getItems(), PUBLISHER_NAME); }
private static Document getDocumentForTheseTests(RowItemContainer<Document> documents) { return DocumentTest.getDocument(documents.getItems(), DOCUMENT_TITLE); }