@Test public void mongoRelationshipWithSessionAvailable() { Assertions.assertThat(detector.detect()).contains(Dependency.on(Component.of("local", ComponentType.MONGODB))); }
@Override public Set<Relationship> detect() { Set<Relationship> result = new HashSet<>(); for (MongoClient client : clients) { for (String db : client.listDatabaseNames()) { result.add(Dependency.on(Component.of(db, ComponentType.MONGODB))); } } return result; }
MongoDbRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { Set<Relationship> result = new HashSet<>(); for (MongoClient client : clients) { for (String db : client.listDatabaseNames()) { result.add(Dependency.on(Component.of(db, ComponentType.MONGODB))); } } return result; } }
MongoDbRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { Set<Relationship> result = new HashSet<>(); for (MongoClient client : clients) { for (String db : client.listDatabaseNames()) { result.add(Dependency.on(Component.of(db, ComponentType.MONGODB))); } } return result; } MongoDbRelationshipDetector(Collection<MongoClient> clients); }
MongoDbRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { Set<Relationship> result = new HashSet<>(); for (MongoClient client : clients) { for (String db : client.listDatabaseNames()) { result.add(Dependency.on(Component.of(db, ComponentType.MONGODB))); } } return result; } MongoDbRelationshipDetector(Collection<MongoClient> clients); @Override Set<Relationship> detect(); }
MongoDbRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { Set<Relationship> result = new HashSet<>(); for (MongoClient client : clients) { for (String db : client.listDatabaseNames()) { result.add(Dependency.on(Component.of(db, ComponentType.MONGODB))); } } return result; } MongoDbRelationshipDetector(Collection<MongoClient> clients); @Override Set<Relationship> detect();  }