Map<Class<?>, Class<?>> bindings = new HashMap<>();
new ClassPathScanner(PREFIX).bindAllSingletons(PREFIX, bindings::put);
assertThat(bindings).containsExactly(
- ClassPathScannerTestTopInterface.class, ClassPathScannerTestImplementation.class);
+ ClassPathScannerTestTopInterface.class, ClassPathScannerTestImplementation.class,
+ ClassPathScannerTestAnotherInterface.class, ClassPathScannerTestImplementation.class);
}
}
--- /dev/null
+/*
+ * Copyright © 2018 Red Hat, Inc. and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.inject.tests;
+
+public interface ClassPathScannerTestAnotherInterface {
+}
import javax.inject.Singleton;
@Singleton
-public class ClassPathScannerTestImplementation implements ClassPathScannerTestTopInterface {
+public class ClassPathScannerTestImplementation
+ implements ClassPathScannerTestTopInterface, ClassPathScannerTestAnotherInterface {
}