@Test public void testExtract() { publicDataExtractor.extract(file); for (PublicEntityDefinition definition : PublicEntityDefinition.values()) { Mockito.verify(extractor, Mockito.times(1)).extractEntities(Mockito.eq(file), Mockito.eq(definition.getEntityName()), Mockito.any(Predicate.class)); } }
@Override public void extract(ExtractFile file) { extractor.setExtractionQuery(new NeutralQuery()); for (PublicEntityDefinition entity : PublicEntityDefinition.values()) { extractor.extractEntities(file, entity.getEntityName(), new Predicate<Entity>() { @Override public boolean apply(Entity input) { boolean shouldExtract = true; if (!isPublicEntity(input.getType())) { shouldExtract = false; } return shouldExtract; } }); } }
AllPublicDataExtractor implements PublicDataExtractor { @Override public void extract(ExtractFile file) { extractor.setExtractionQuery(new NeutralQuery()); for (PublicEntityDefinition entity : PublicEntityDefinition.values()) { extractor.extractEntities(file, entity.getEntityName(), new Predicate<Entity>() { @Override public boolean apply(Entity input) { boolean shouldExtract = true; if (!isPublicEntity(input.getType())) { shouldExtract = false; } return shouldExtract; } }); } } }
AllPublicDataExtractor implements PublicDataExtractor { @Override public void extract(ExtractFile file) { extractor.setExtractionQuery(new NeutralQuery()); for (PublicEntityDefinition entity : PublicEntityDefinition.values()) { extractor.extractEntities(file, entity.getEntityName(), new Predicate<Entity>() { @Override public boolean apply(Entity input) { boolean shouldExtract = true; if (!isPublicEntity(input.getType())) { shouldExtract = false; } return shouldExtract; } }); } } AllPublicDataExtractor(EntityExtractor extractor); }
AllPublicDataExtractor implements PublicDataExtractor { @Override public void extract(ExtractFile file) { extractor.setExtractionQuery(new NeutralQuery()); for (PublicEntityDefinition entity : PublicEntityDefinition.values()) { extractor.extractEntities(file, entity.getEntityName(), new Predicate<Entity>() { @Override public boolean apply(Entity input) { boolean shouldExtract = true; if (!isPublicEntity(input.getType())) { shouldExtract = false; } return shouldExtract; } }); } } AllPublicDataExtractor(EntityExtractor extractor); @Override void extract(ExtractFile file); }
AllPublicDataExtractor implements PublicDataExtractor { @Override public void extract(ExtractFile file) { extractor.setExtractionQuery(new NeutralQuery()); for (PublicEntityDefinition entity : PublicEntityDefinition.values()) { extractor.extractEntities(file, entity.getEntityName(), new Predicate<Entity>() { @Override public boolean apply(Entity input) { boolean shouldExtract = true; if (!isPublicEntity(input.getType())) { shouldExtract = false; } return shouldExtract; } }); } } AllPublicDataExtractor(EntityExtractor extractor); @Override void extract(ExtractFile file);  }