/external/guice/core/test/com/google/inject/ |
D | OptionalBindingTest.java | 85 Guice.createInjector(everythingModule) in testEverythingInjectorGetInstance() 91 Guice.createInjector(partialModule) in testPartialInjectorGetInstance() 97 Guice.createInjector() in testNothingInjectorGetInstance() 104 Guice.createInjector(everythingModule).injectMembers(instance); in testEverythingInjectorInjectMembers() 110 Guice.createInjector(partialModule).injectMembers(instance); in testPartialInjectorInjectMembers() 116 Guice.createInjector().injectMembers(instance); in testNothingInjectorInjectMembers() 121 Guice.createInjector(everythingModule, toInstanceModule) in testEverythingInjectorToInstance() 127 Guice.createInjector(partialModule, toInstanceModule) in testPartialInjectorToInstance() 133 Guice.createInjector(toInstanceModule) in testNothingInjectorToInstance() 139 Guice.createInjector(everythingModule, toProviderInstanceModule) in testEverythingInjectorToProviderInstance() [all …]
|
D | NullableInjectionPointTest.java | 21 createInjector().getInstance(FooConstructor.class); in testInjectNullIntoNotNullableConstructor() 33 createInjector().getInstance(FooMethod.class); in testInjectNullIntoNotNullableMethod() 45 createInjector().getInstance(FooField.class); in testInjectNullIntoNotNullableField() 60 assertNull(createInjector().getInstance(Foo.class)); in testGetInstanceOfNull() 65 = createInjector().getInstance(NullableFooConstructor.class); in testInjectNullIntoNullableConstructor() 71 = createInjector().getInstance(NullableFooMethod.class); in testInjectNullIntoNullableMethod() 77 = createInjector().getInstance(NullableFooField.class); in testInjectNullIntoNullableField() 83 = createInjector().getInstance(CustomNullableFooConstructor.class); in testInjectNullIntoCustomNullableConstructor() 89 = createInjector().getInstance(CustomNullableFooMethod.class); in testInjectNullIntoCustomNullableMethod() 95 = createInjector().getInstance(CustomNullableFooField.class); in testInjectNullIntoCustomNullableField() [all …]
|
D | ProvisionExceptionTest.java | 42 Guice.createInjector().getInstance(A.class); in testExceptionsCollapsed() 59 Guice.createInjector(new AbstractModule() { in testExceptionsCollapsedWithScopes() 77 Guice.createInjector().getInstance(E.class); in testMethodInjectionExceptions() 88 Guice.createInjector(new AbstractModule() { in testBindToProviderInstanceExceptions() 108 Guice.createInjector().getInstance(F.class); in testProvisionExceptionsAreWrappedForBindToType() 118 Guice.createInjector(new AbstractModule() { in testProvisionExceptionsAreWrappedForBindToProviderType() 133 Guice.createInjector(new AbstractModule() { in testProvisionExceptionsAreWrappedForBindToProviderInstance() 148 Guice.createInjector().getInstance(A.class); in testProvisionExceptionIsSerializable() 167 Guice.createInjector().getInstance(G.class); in testMultipleCauses() 181 Injector injector = Guice.createInjector(); in testInjectInnerClass() [all …]
|
D | JitBindingsTest.java | 58 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedBindingWorks() 74 Injector injector = Guice.createInjector(new AbstractModule() { in testMoreBasicsWork() 92 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedEagerSingleton() 108 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicsWithEagerSingleton() 126 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedToScoped() 142 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicsWithScoped() 161 Guice.createInjector(new AbstractModule() { in testFailsIfInjectingScopedDirectlyWhenItIsntBound() 177 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedProviderBindingWorks() 193 Guice.createInjector(new AbstractModule() { in testJitGetFails() 208 Guice.createInjector(new AbstractModule() { in testJitInjectionFails() [all …]
|
D | ParentInjectorTest.java | 42 Injector parent = Guice.createInjector(bindsA); in testParentAndChildCannotShareExplicitBindings() 54 Injector parent = Guice.createInjector(); in testParentJitBindingWontClobberChildBinding() 70 Injector parent = Guice.createInjector(); in testChildCannotBindToAParentJitBinding() 82 Injector parent = Guice.createInjector(); in testJustInTimeBindingsAreSharedWithParentIfPossible() 94 Injector parent = Guice.createInjector(bindsB); in testBindingsInherited() 100 Injector top = Guice.createInjector(bindsA); in testGetParent() 109 Injector parent = Guice.createInjector(); in testChildBindingsNotVisibleToParent() 119 Injector parent = Guice.createInjector(new AbstractModule() { in testScopesInherited() 141 Injector parent = Guice.createInjector(new AbstractModule() { in testInterceptorsInherited() 159 Injector parent = Guice.createInjector(bindListConverterModule); in testTypeConvertersInherited() [all …]
|
D | InjectorTest.java | 51 Injector injector = Guice.createInjector(Stage.TOOL); in testToStringDoesNotInfinitelyRecurse() 60 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderMethods() 94 return Guice.createInjector(new AbstractModule() { in createFooInjector() 114 Injector injector = Guice.createInjector(new AbstractModule() { 125 Injector injector = Guice.createInjector(); 206 Guice.createInjector(new AbstractModule() { 220 Guice.createInjector(new AbstractModule() { 251 Injector injector = Guice.createInjector(new AbstractModule() { 279 Injector injector = Guice.createInjector(new AbstractModule() { 307 Guice.createInjector(new AbstractModule() { [all …]
|
D | CircularDependencyTest.java | 48 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructors() 59 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderMethods() 70 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderInstances() 91 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderKeys() 102 Injector injector = Guice.createInjector(); in testCircularlyDependentConstructorsWithProvidedBy() 194 Guice.createInjector().getInstance(C.class); in testUnresolvableCircularDependency() 205 Guice.createInjector(new AbstractModule() { in testUnresolvableCircularDependenciesWithProviderInstances() 220 Guice.createInjector(new AbstractModule() { in testUnresolvableCircularDependenciesWithProviderKeys() 236 Guice.createInjector().getInstance(C2.class); in testUnresolvableCircularDependenciesWithProvidedBy() 277 Guice.createInjector(new AbstractModule() { in testDisabledCircularDependency() [all …]
|
D | BinderTest.java | 75 Guice.createInjector(new Module() { in testProviderFromBinder() 92 Guice.createInjector(new AbstractModule() { in testMissingBindings() 129 Guice.createInjector(new AbstractModule() { in testMissingDependency() 150 Guice.createInjector(new AbstractModule() { in testDanglingConstantBinding() 165 Guice.createInjector(new AbstractModule() { in testRecursiveBinding() 180 Guice.createInjector(new AbstractModule() { in testBindingNullConstant() 197 Guice.createInjector(new AbstractModule() { in testToStringOnBinderApi() 222 Guice.createInjector(new AbstractModule() { in testNothingIsSerializableInBinderApi() 251 Injector injector = Guice.createInjector(new AbstractModule() { in testArrayTypeCanonicalization() 267 Guice.createInjector(new AbstractModule() { in testArrayTypeCanonicalization() [all …]
|
D | MembersInjectorTest.java | 54 Guice.createInjector(new AbstractModule() { in testMembersInjectorFromBinder() 99 Injector injector = Guice.createInjector(new AbstractModule() { in testMembersInjectorFromInjector() 127 Injector injector = Guice.createInjector(); in testMembersInjectorWithNonInjectedTypes() 137 Injector injector = Guice.createInjector(); in testInjectionFailure() 152 Injector injector = Guice.createInjector(); in testInjectionAppliesToSpecifiedType() 159 InjectsMembersInjector injectsMembersInjector = Guice.createInjector(new AbstractModule() { in testInjectingMembersInjector() 173 Guice.createInjector(new AbstractModule() { in testCannotBindMembersInjector() 185 Guice.createInjector(new AbstractModule() { in testCannotBindMembersInjector() 200 Guice.createInjector().getInstance(InjectsBrokenMembersInjector.class); in testInjectingMembersInjectorWithErrorsInDependencies() 214 Injector injector = Guice.createInjector(new AbstractModule() { in testLookupMembersInjectorBinding() [all …]
|
D | RequireAtInjectOnConstructorsTest.java | 31 Guice.createInjector(new AbstractModule() { in testNoCxtors_explicitBinding() 49 Injector injector = Guice.createInjector(new AbstractModule() { in testNoCxtors_jitBinding() 68 Guice.createInjector(new AbstractModule() { in testNoCxtors_implicitBinding() 87 Guice.createInjector(new AbstractModule() { in testNoCxtors_inheritedByPrivateModules() 111 Guice.createInjector(new AbstractModule() { in testNoCxtors_accumulatesAllErrors() 134 Guice.createInjector(new AbstractModule() { in testNoCxtors_separateOptionsForPrivateModules() 161 Guice.createInjector(new AbstractModule() { in testManyConstructorsButNoneWithAtInject() 179 Injector injector = Guice.createInjector(new AbstractModule() { in testRequireAtInjectStillAllowsToConstructorBindings()
|
D | PrivateModuleTest.java | 44 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicUsage() 78 Injector injector = Guice.createInjector(new AbstractModule() { in testWithoutPrivateModules() 98 Guice.createInjector(new AbstractModule() { in testMisplacedExposedAnnotation() 116 Guice.createInjector(new AbstractModule() { in testMisplacedExposeStatement() 130 Injector injector = Guice.createInjector(new AbstractModule() { in testPrivateModulesAndProvidesMethods() 179 Guice.createInjector(new AbstractModule() { in testCannotBindAKeyExportedByASibling() 206 Guice.createInjector(new AbstractModule() { in testExposeButNoBind() 232 Guice.createInjector( in testMessagesFromPrivateModulesAreNicelyIntegrated() 258 Injector injector = Guice.createInjector(new PrivateModule() { in testNestedPrivateInjectors() 275 Injector injector = Guice.createInjector(new PrivateModule() { in testInstallingRegularModulesFromPrivateModules() [all …]
|
D | ImplicitBindingTest.java | 34 Injector injector = Guice.createInjector(); in testCircularDependency() 52 Injector injector = Guice.createInjector(); in testDefaultImplementation() 71 Injector injector = Guice.createInjector(); in testDefaultProvider() 77 Injector injector = Guice.createInjector(new AbstractModule() { in testBindingOverridesImplementedBy() 93 Guice.createInjector().getInstance(Key.get(I.class, Names.named("i"))); in testNoImplicitBindingIsCreatedForAnnotatedKeys() 122 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularJitBindingsLeaveNoResidue() 246 Injector parentSetupRootInjector = Guice.createInjector(testModule); in testInstancesRequestingProvidersForThemselvesWithChildInjectors() 254 Injector childSetupRootInjector = Guice.createInjector(); in testInstancesRequestingProvidersForThemselvesWithChildInjectors() 309 Injector injector = Guice.createInjector(); in testRecursiveJitBindingsCleanupCorrectly() 348 NonEmptyEnum cardSuit = Guice.createInjector().getInstance(NonEmptyEnum.class); in testProvidedByNonEmptyEnum() [all …]
|
D | RequestInjectionTest.java | 52 Guice.createInjector(new AbstractModule() { in testInjectMembers() 68 Guice.createInjector(new AbstractModule() { in testInjectStatics() 84 Guice.createInjector(new AbstractModule() { in testInjectMembersAndStatics() 102 Guice.createInjector(new AbstractModule() { in testValidationErrorOnInjectedMembers() 117 Guice.createInjector(new AbstractModule() { in testInjectionErrorOnInjectedMembers() 138 Guice.createInjector(new AbstractModule() { in testUserExceptionWhileInjectingInstance() 154 Guice.createInjector(new AbstractModule() { in testUserExceptionWhileInjectingStatically() 205 Injector injector = Guice.createInjector(new AbstractModule() { in testEarlyInjectableReferencesWithSameIdentity()
|
D | TypeLiteralInjectionTest.java | 37 Guice.createInjector(new AbstractModule() { in testBindingToRawTypeLiteralIsNotAllowed() 51 Guice.createInjector(new AbstractModule() { in testBindingToParameterizedTypeLiteralIsNotAllowed() 65 C c = Guice.createInjector().getInstance(C.class); in testInjectTypeLiteralWithRawTypes() 70 Guice.createInjector().getInstance(B.class); in testInjectTypeLiteralWithRawTypes() 79 B<Integer> b = Guice.createInjector().getInstance(new Key<B<Integer>>() {}); in testInjectTypeLiteralWithClassTypes() 88 Guice.createInjector().getInstance(TypeLiteral.class); in testInjectRawTypeLiteral()
|
D | DuplicateBindingsTest.java | 53 Injector injector = Guice.createInjector( in testDuplicateBindingsAreIgnored() 84 Guice.createInjector(new FailingProviderModule(), new FailingProviderModule()); in testProviderMethodsFailIfInstancesDiffer() 96 Guice.createInjector( in testSameScopeInstanceIgnored() 101 Guice.createInjector( in testSameScopeInstanceIgnored() 108 Guice.createInjector( in testSameScopeAnnotationIgnored() 115 Guice.createInjector( in testMixedAnnotationAndScopeForSingletonIgnored() 122 Guice.createInjector( in testMixedScopeAndUnscopedIgnored() 130 Guice.createInjector( in testMixedScopeFails() 158 Guice.createInjector( in testMixedTargetsFails() 179 Guice.createInjector(new ThrowingModule(), new ThrowingModule()); in testExceptionInEqualsThrowsCreationException() [all …]
|
D | BindingTest.java | 57 Guice.createInjector(new AbstractModule() { in testExplicitCyclicDependency() 111 Guice.createInjector(new AbstractModule() { in testBindToUnboundLinkedBinding() 127 Injector injector = Guice.createInjector(new AbstractModule() { in testScopeIsAppliedToKeyNotTarget() 196 assertNotNull(Guice.createInjector().getInstance(clazz)); in assertBindingSucceeds() 201 Guice.createInjector().getInstance(clazz); in assertBindingFails() 212 Guice.createInjector().getInstance(TooManyConstructors.class); in testTooManyConstructors() 230 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorBinding() 245 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorBindingsOnParameterizedTypes() 267 Guice.createInjector(new AbstractModule() { in testToConstructorBindingsFailsOnRawTypes() 293 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorAndMethodInterceptors() [all …]
|
/external/guice/extensions/testlib/test/com/google/inject/testing/fieldbinder/ |
D | BoundFieldModuleTest.java | 49 Guice.createInjector(module); in testBindingNothing() 61 Injector injector = Guice.createInjector(module); in testBindingOnePrivate() 73 Injector injector = Guice.createInjector(module); in testBindingOnePublic() 96 Injector injector = Guice.createInjector(module); in testSuperTypeBinding() 110 Injector injector = Guice.createInjector(module); in testBindingTwo() 123 Injector injector = Guice.createInjector(module); in testBindingSuperType() 135 Injector injector = Guice.createInjector(module); in testBindingSuperTypeAccessSubType() 159 Guice.createInjector(module); in testBindingIncorrectTypeProviderFails() 184 Injector injector = Guice.createInjector(module); in testBindingWithBindingAnnotation() 207 Injector injector = Guice.createInjector(module); in testBindingWithQualifier() [all …]
|
/external/guice/core/src/com/google/inject/ |
D | Guice.java | 61 public static Injector createInjector(Module... modules) { in createInjector() method in Guice 62 return createInjector(Arrays.asList(modules)); in createInjector() 72 public static Injector createInjector(Iterable<? extends Module> modules) { in createInjector() method in Guice 73 return createInjector(Stage.DEVELOPMENT, modules); in createInjector() 83 public static Injector createInjector(Stage stage, Module... modules) { in createInjector() method in Guice 84 return createInjector(stage, Arrays.asList(modules)); in createInjector() 94 public static Injector createInjector(Stage stage, in createInjector() method in Guice
|
/external/guice/core/test/com/google/inject/util/ |
D | OverrideModuleTest.java | 21 import static com.google.inject.Guice.createInjector; 72 Injector injector = createInjector(Modules.override(newModule("A")).with(newModule("B"))); in testOverride() 79 Injector injector = createInjector(module); in testOverrideMultiple() 87 Injector injector = createInjector(Modules.override(EMPTY_MODULE).with(newModule("B"))); in testOverrideUnmatchedTolerated() 104 Injector injector = createInjector(Modules.override(original).with(replacements)); in testOverrideConstant() 116 Injector injector = createInjector(Modules.override(original).with(EMPTY_MODULE)); in testGetProviderInModule() 131 Injector injector = createInjector(Modules.override(original).with(replacements)); in testOverrideWhatGetProviderProvided() 150 Injector injector = createInjector(Modules.override(original).with(replacements)); in testOverrideUsingOriginalsGetProvider() 180 Injector injector = createInjector(Modules.override(overrides).with(replacements2)); in testOverrideOfOverride() 202 createInjector(module); in testOverridesTwiceFails() [all …]
|
/external/guice/extensions/throwingproviders/test/com/google/inject/throwingproviders/ |
D | CheckedProviderTest.java | 98 bindInjector = Guice.createInjector(new AbstractModule() { in setUp() 116 providesInjector = Guice.createInjector(new AbstractModule() { in setUp() 140 cxtorInjector = Guice.createInjector(new AbstractModule() { in setUp() 302 bindInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Bind() 321 providesInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Provides() 355 cxtorInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Cxtor() 416 bindInjector = Guice.createInjector(new AbstractModule() { in testThrowingProviderSubclassing() 433 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Bind() 450 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Provides() 471 bindInjector = Guice.createInjector(new AbstractModule() { in testBindingToSubSubInterface_Bind() [all …]
|
D | ThrowingProviderTest.java | 67 private Injector bindInjector = Guice.createInjector(new AbstractModule() { 82 private Injector providesInjector = Guice.createInjector(new AbstractModule() { 219 bindInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Bind() 237 providesInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Provides() 302 bindInjector = Guice.createInjector(new AbstractModule() { in testThrowingProviderSubclassing() 318 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Bind() 334 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Provides() 354 bindInjector = Guice.createInjector(new AbstractModule() { in testBindingToSubSubInterface_Bind() 369 Guice.createInjector(new AbstractModule() { in testBindingToSubSubInterface_Provides() 391 bindInjector = Guice.createInjector(new AbstractModule() { in testBindingToInterfaceWithExtraMethod_Bind() [all …]
|
/external/guice/core/test/com/google/inject/spi/ |
D | ProviderMethodsTest.java | 73 Injector injector = Guice.createInjector(this); in testProviderMethods() 202 Guice.createInjector(new AbstractModule() { 223 Injector injector = Guice.createInjector( 262 Injector injector = Guice.createInjector((Module) new AbstractModule() { 292 Injector injector = Guice.createInjector(installsSelf); 300 Injector injector = Guice.createInjector(new AbstractModule() { 336 Injector injector = Guice.createInjector(module); 362 Injector injector = Guice.createInjector(module); 384 Guice.createInjector(new AbstractModule() { 399 Injector injector = Guice.createInjector(new FooModule(loggerRef)); [all …]
|
D | ModuleAnnotatedMethodScannerTest.java | 63 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testScanning() 88 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testSkipSources() 102 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testWithSource() 115 Guice.createInjector(module, NamedMunger.module()); in testMoreThanOneClaimedAnnotationFails() 174 Guice.createInjector(new SomeModule(), FailingScanner.module()); 218 Injector parent = Guice.createInjector(NamedMunger.module()); 238 Injector parent = Guice.createInjector(); 249 Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() { 260 Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() { 274 Injector injector = Guice.createInjector(NamedMunger.module(), new AbstractModule() { [all …]
|
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/ |
D | FactoryModuleBuilderTest.java | 57 Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingFailsWithInterface() 77 Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingFailsWithAbstractClass() 97 Injector injector = Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingCreatesNewObjects() 113 Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingFailsWithInterface() 136 Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingFailsWithAbstractClass() 159 Injector injector = Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingCreatesNewObjects() 175 Injector injector = Guice.createInjector(new AbstractModule() { in testAnnotatedAndParentBoundReturnValue() 194 Injector injector = Guice.createInjector(new AbstractModule() { in testParentBoundReturnValue() 210 Injector injector = Guice.createInjector(new AbstractModule() { in testConfigureAnnotatedReturnValue() 225 Injector injector = Guice.createInjector(new AbstractModule() { in testNoBindingAssistedInject() [all …]
|
D | FactoryProvider2Test.java | 51 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedFactory() 71 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedFactoryWithAnnotations() 134 Injector injector = Guice.createInjector(new AbstractModule() { in testFactoryUsesInjectedConstructor() 170 Injector injector = Guice.createInjector(new AbstractModule() { in testConstructorDoesntNeedAllFactoryMethodArguments() 192 Injector injector = Guice.createInjector(new AbstractModule() { in testMethodsAndFieldsGetInjected() 229 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderInjection() 256 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedProviderInjection() 289 Injector injector = Guice.createInjector(new AbstractModule() { in testTypeTokenInjection() 321 Injector injector = Guice.createInjector(new AbstractModule() { in testTypeTokenProviderInjection() 357 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistInjectionInNonPublicConstructor() [all …]
|