@Test public void buildNoActiveConnectors() { final SsgActiveConnectorEntityBuilder builder = new SsgActiveConnectorEntityBuilder(new IdGenerator()); final Bundle bundle = new Bundle(); List<Entity> activeConnectors = builder.build(bundle, EntityBuilder.BundleType.ENVIRONMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument()); assertEquals(0, activeConnectors.size()); activeConnectors = builder.build(bundle, EntityBuilder.BundleType.DEPLOYMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument()); assertEquals(0, activeConnectors.size()); }
@Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { if (bundle instanceof AnnotatedBundle) { Map<String, SsgActiveConnector> activeConnectorMap = Optional.ofNullable(bundle.getSsgActiveConnectors()).orElse(Collections.emptyMap()); return buildEntities(activeConnectorMap, ((AnnotatedBundle) bundle).getFullBundle(), bundleType, document); } else { return buildEntities(bundle.getSsgActiveConnectors(), bundle, bundleType, document); } }
SsgActiveConnectorEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { if (bundle instanceof AnnotatedBundle) { Map<String, SsgActiveConnector> activeConnectorMap = Optional.ofNullable(bundle.getSsgActiveConnectors()).orElse(Collections.emptyMap()); return buildEntities(activeConnectorMap, ((AnnotatedBundle) bundle).getFullBundle(), bundleType, document); } else { return buildEntities(bundle.getSsgActiveConnectors(), bundle, bundleType, document); } } }
SsgActiveConnectorEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { if (bundle instanceof AnnotatedBundle) { Map<String, SsgActiveConnector> activeConnectorMap = Optional.ofNullable(bundle.getSsgActiveConnectors()).orElse(Collections.emptyMap()); return buildEntities(activeConnectorMap, ((AnnotatedBundle) bundle).getFullBundle(), bundleType, document); } else { return buildEntities(bundle.getSsgActiveConnectors(), bundle, bundleType, document); } } @Inject  SsgActiveConnectorEntityBuilder(IdGenerator idGenerator); }
SsgActiveConnectorEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { if (bundle instanceof AnnotatedBundle) { Map<String, SsgActiveConnector> activeConnectorMap = Optional.ofNullable(bundle.getSsgActiveConnectors()).orElse(Collections.emptyMap()); return buildEntities(activeConnectorMap, ((AnnotatedBundle) bundle).getFullBundle(), bundleType, document); } else { return buildEntities(bundle.getSsgActiveConnectors(), bundle, bundleType, document); } } @Inject  SsgActiveConnectorEntityBuilder(IdGenerator idGenerator); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
SsgActiveConnectorEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { if (bundle instanceof AnnotatedBundle) { Map<String, SsgActiveConnector> activeConnectorMap = Optional.ofNullable(bundle.getSsgActiveConnectors()).orElse(Collections.emptyMap()); return buildEntities(activeConnectorMap, ((AnnotatedBundle) bundle).getFullBundle(), bundleType, document); } else { return buildEntities(bundle.getSsgActiveConnectors(), bundle, bundleType, document); } } @Inject  SsgActiveConnectorEntityBuilder(IdGenerator idGenerator); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }