@Test void buildFromEmptyBundle_noFolders() { FolderEntityBuilder builder = new FolderEntityBuilder(ID_GENERATOR); final List<Entity> entities = builder.build(new Bundle(projectInfo), DEPLOYMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument()); assertTrue(entities.isEmpty()); }
public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }