@Test @Ignore public void test_Write_TwoElements () { harvesterDao.writeMetaInfos(harvesterDocuments.subList(0, 2)); final DB db = publisherConfig.getTargetDBConfig().get(0).getMongoConfig().connectToDB(); int idx = 0; for (final HarvesterRecord record: harvesterDocuments.subList(0, 1)) { for (final SourceDocumentReferenceMetaInfo metaInfo : record.getUniqueMetainfos()) { final WebResourceMetaInfo writtenMetaInfo = webResourceMetaInfoDao.read(metaInfo.getId()); final WebResourceMetaInfo correctMetaInfo = correctMetaInfos.get(idx++); ReflectionAssert.assertReflectionEquals(correctMetaInfo, writtenMetaInfo); } final HarvesterDocument document = record.getEdmIsShownByDocument(); if (null != document) { final String edmObject = (String) db.getCollection("Aggregation").findOne( new BasicDBObject("about", "/aggregation/provider" + document.getReferenceOwner().getRecordId())) .get("edmObject"); assertEquals(document.getUrl(), edmObject); } } }
public void writeMetaInfos (Collection<HarvesterRecord> records) { writeMetaInfos(records, "publisher-writeMetainfos-"+ Double.doubleToLongBits(Math.random() * 5000)); }
PublisherHarvesterDao { public void writeMetaInfos (Collection<HarvesterRecord> records) { writeMetaInfos(records, "publisher-writeMetainfos-"+ Double.doubleToLongBits(Math.random() * 5000)); } }
PublisherHarvesterDao { public void writeMetaInfos (Collection<HarvesterRecord> records) { writeMetaInfos(records, "publisher-writeMetainfos-"+ Double.doubleToLongBits(Math.random() * 5000)); } PublisherHarvesterDao(DBTargetConfig config); }
PublisherHarvesterDao { public void writeMetaInfos (Collection<HarvesterRecord> records) { writeMetaInfos(records, "publisher-writeMetainfos-"+ Double.doubleToLongBits(Math.random() * 5000)); } PublisherHarvesterDao(DBTargetConfig config); void writeMetaInfos(Collection<HarvesterRecord> records); void writeMetaInfos(Collection<HarvesterRecord> records, final String publishingBatchId); }
PublisherHarvesterDao { public void writeMetaInfos (Collection<HarvesterRecord> records) { writeMetaInfos(records, "publisher-writeMetainfos-"+ Double.doubleToLongBits(Math.random() * 5000)); } PublisherHarvesterDao(DBTargetConfig config); void writeMetaInfos(Collection<HarvesterRecord> records); void writeMetaInfos(Collection<HarvesterRecord> records, final String publishingBatchId);  }