Asserts that MapBinderBinding visitors for work correctly. @param The type of the binding @param mapKey The key the map belongs to. @param keyType the TypeLiteral of the key of the map @param valueType the TypeLiteral of the value of the map @param modules The modules that define the mapbinding
(
Key<T> mapKey,
TypeLiteral<?> keyType,
TypeLiteral<?> valueType,
Iterable<? extends Module> modules,
VisitType visitType,
boolean allowDuplicates,
int expectedMapBindings,
MapResult<?, ?>... results)
| 110 | * @param results The kind of bindings contained in the mapbinder. |
| 111 | */ |
| 112 | static <T> void assertMapVisitor( |
| 113 | Key<T> mapKey, |
| 114 | TypeLiteral<?> keyType, |
| 115 | TypeLiteral<?> valueType, |
| 116 | Iterable<? extends Module> modules, |
| 117 | VisitType visitType, |
| 118 | boolean allowDuplicates, |
| 119 | int expectedMapBindings, |
| 120 | MapResult<?, ?>... results) { |
| 121 | if (visitType == null) { |
| 122 | fail("must test something"); |
| 123 | } |
| 124 | |
| 125 | if (visitType == BOTH || visitType == INJECTOR) { |
| 126 | mapInjectorTest( |
| 127 | mapKey, keyType, valueType, modules, allowDuplicates, expectedMapBindings, results); |
| 128 | } |
| 129 | |
| 130 | if (visitType == BOTH || visitType == MODULE) { |
| 131 | mapModuleTest( |
| 132 | mapKey, keyType, valueType, modules, allowDuplicates, expectedMapBindings, results); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | @SuppressWarnings("unchecked") |
| 137 | private static <T> void mapInjectorTest( |
no test coverage detected