Esempio n. 1
0
  public static void checkItemCount(RowItemContainer<?> items, int itemCount) {
    int numItems = items.getItems().size();

    if (numItems != itemCount) {
      fail("Found " + numItems + " item(s); expected " + itemCount + ".");
    }
  }
Esempio n. 2
0
  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);
  }
Esempio n. 3
0
  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);
  }
Esempio n. 4
0
 private static Publisher getPublisherForTheseTests(RowItemContainer<Publisher> publishers) {
   return PublisherTest.getPublisher(publishers.getItems(), PUBLISHER_NAME);
 }
Esempio n. 5
0
 private static Document getDocumentForTheseTests(RowItemContainer<Document> documents) {
   return DocumentTest.getDocument(documents.getItems(), DOCUMENT_TITLE);
 }