コード例 #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 + ".");
    }
  }
コード例 #2
0
ファイル: AddressTest.java プロジェクト: cns-iu/nwb
  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);
  }
コード例 #3
0
ファイル: AddressTest.java プロジェクト: cns-iu/nwb
  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);
  }
コード例 #4
0
ファイル: AddressTest.java プロジェクト: cns-iu/nwb
 private static Publisher getPublisherForTheseTests(RowItemContainer<Publisher> publishers) {
   return PublisherTest.getPublisher(publishers.getItems(), PUBLISHER_NAME);
 }
コード例 #5
0
ファイル: AddressTest.java プロジェクト: cns-iu/nwb
 private static Document getDocumentForTheseTests(RowItemContainer<Document> documents) {
   return DocumentTest.getDocument(documents.getItems(), DOCUMENT_TITLE);
 }