Home
last modified time | relevance | path

Searched refs:injector (Results 1 – 25 of 240) sorted by relevance

12345678910

/external/webrtc/test/pc/e2e/analyzer/video/
Dsingle_process_encoded_image_data_injector_unittest.cc47 SingleProcessEncodedImageDataInjector injector; in TEST() local
48 injector.Start(/*expected_receivers_count=*/1); in TEST()
55 injector.ExtractData(injector.InjectData(512, false, source)); in TEST()
66 SingleProcessEncodedImageDataInjector injector; in TEST() local
67 injector.Start(/*expected_receivers_count=*/1); in TEST()
74 injector.ExtractData(injector.InjectData(512, true, source)); in TEST()
83 SingleProcessEncodedImageDataInjector injector; in TEST() local
84 injector.Start(/*expected_receivers_count=*/1); in TEST()
90 EncodedImage intermediate = injector.InjectData(512, false, source); in TEST()
93 EncodedImageExtractionResult out = injector.ExtractData(intermediate); in TEST()
[all …]
/external/libchrome/base/message_loop/
Dmessage_pump_glib_unittest.cc36 source_->injector = this; in EventInjector()
101 EventInjector* injector; member
117 *timeout_ms = static_cast<Source*>(source)->injector->HandlePrepare(); in Prepare()
122 return static_cast<Source*>(source)->injector->HandleCheck(); in Check()
128 static_cast<Source*>(source)->injector->HandleDispatch(); in Dispatch()
148 void ExpectProcessedEvents(EventInjector* injector, int count) { in ExpectProcessedEvents() argument
149 EXPECT_EQ(injector->processed_events(), count); in ExpectProcessedEvents()
175 EventInjector* injector() const { return injector_; } in injector() function in base::__anon72f456270111::MessagePumpGLibTest
190 EXPECT_EQ(0, injector()->processed_events()); in TEST_F()
192 injector()->Reset(); in TEST_F()
[all …]
/external/guice/core/src/com/google/inject/internal/
DInjectorShell.java54 private final InjectorImpl injector; field in InjectorShell
56 private InjectorShell(List<Element> elements, InjectorImpl injector) { in InjectorShell() argument
58 this.injector = injector; in InjectorShell()
62 return injector; in getInjector()
144 InjectorImpl injector = new InjectorImpl(parent, state, options); in build() local
146 privateElements.initInjector(injector); in build()
151 TypeConverterBindingProcessor.prepareBuiltInConverters(injector); in build()
156 new MessageProcessor(errors).process(injector, elements); in build()
159 new InterceptorBindingProcessor(errors).process(injector, elements); in build()
163 new ListenerBindingProcessor(errors).process(injector, elements); in build()
[all …]
DTypeConverterBindingProcessor.java43 static void prepareBuiltInConverters(InjectorImpl injector) { in prepareBuiltInConverters() argument
45 convertToPrimitiveType(injector, int.class, Integer.class); in prepareBuiltInConverters()
46 convertToPrimitiveType(injector, long.class, Long.class); in prepareBuiltInConverters()
47 convertToPrimitiveType(injector, boolean.class, Boolean.class); in prepareBuiltInConverters()
48 convertToPrimitiveType(injector, byte.class, Byte.class); in prepareBuiltInConverters()
49 convertToPrimitiveType(injector, short.class, Short.class); in prepareBuiltInConverters()
50 convertToPrimitiveType(injector, float.class, Float.class); in prepareBuiltInConverters()
51 convertToPrimitiveType(injector, double.class, Double.class); in prepareBuiltInConverters()
54 injector, in prepareBuiltInConverters()
73 injector, in prepareBuiltInConverters()
[all …]
/external/guice/core/test/com/google/inject/
DImplicitBindingTest.java31 Injector injector = Guice.createInjector(); in testCircularDependency() local
32 Foo foo = injector.getInstance(Foo.class); in testCircularDependency()
50 Injector injector = Guice.createInjector(); in testDefaultImplementation() local
51 I i = injector.getInstance(I.class); in testDefaultImplementation()
71 Injector injector = Guice.createInjector(); in testDefaultProvider() local
72 Provided provided = injector.getInstance(Provided.class); in testDefaultProvider()
77 Injector injector = in testBindingOverridesImplementedBy() local
85 assertEquals(AlternateImpl.class, injector.getInstance(I.class).getClass()); in testBindingOverridesImplementedBy()
135 Injector injector = in testCircularJitBindingsLeaveNoResidue() local
146 Binding v1 = injector.getBinding(Valid.class); in testCircularJitBindingsLeaveNoResidue()
[all …]
DJitBindingsTest.java57 Injector injector = in testLinkedBindingWorks() local
67 ensureWorks(injector, Foo.class); in testLinkedBindingWorks()
71 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testLinkedBindingWorks()
75 Injector injector = in testMoreBasicsWork() local
87 ensureWorks(injector, FooBar.class, Bar.class, Foo.class); in testMoreBasicsWork()
91 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testMoreBasicsWork()
95 Injector injector = in testLinkedEagerSingleton() local
105 ensureWorks(injector, Foo.class); in testLinkedEagerSingleton()
109 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testLinkedEagerSingleton()
113 Injector injector = in testBasicsWithEagerSingleton() local
[all …]
DScopesTest.java92 Injector injector = Guice.createInjector(singletonsModule); in testSingletons() local
95 injector.getInstance(BoundAsSingleton.class), injector.getInstance(BoundAsSingleton.class)); in testSingletons()
98 injector.getInstance(AnnotatedSingleton.class), in testSingletons()
99 injector.getInstance(AnnotatedSingleton.class)); in testSingletons()
102 injector.getInstance(EagerSingleton.class), injector.getInstance(EagerSingleton.class)); in testSingletons()
105 injector.getInstance(LinkedSingleton.class), injector.getInstance(LinkedSingleton.class)); in testSingletons()
108 injector.getInstance(JustInTimeSingleton.class), in testSingletons()
109 injector.getInstance(JustInTimeSingleton.class)); in testSingletons()
112 injector.getInstance(NotASingleton.class), injector.getInstance(NotASingleton.class)); in testSingletons()
115 injector.getInstance(ImplementedBySingleton.class), in testSingletons()
[all …]
DBindingTest.java141 Injector injector = in testScopeIsAppliedToKeyNotTarget() local
151 assertNotSame(injector.getInstance(Integer.class), injector.getInstance(Number.class)); in testScopeIsAppliedToKeyNotTarget()
252 Injector injector = in testToConstructorBinding() local
261 D d = (D) injector.getInstance(Object.class); in testToConstructorBinding()
270 Injector injector = in testToConstructorBindingsOnParameterizedTypes() local
280 C<Stage> one = (C<Stage>) injector.getInstance(s); in testToConstructorBindingsOnParameterizedTypes()
285 C<Injector> two = (C<Injector>) injector.getInstance(i); in testToConstructorBindingsOnParameterizedTypes()
287 assertEquals(injector, two.t); in testToConstructorBindingsOnParameterizedTypes()
288 assertEquals(injector, two.anotherT); in testToConstructorBindingsOnParameterizedTypes()
325 Injector injector = in testToConstructorAndMethodInterceptors() local
[all …]
DTypeListenerTest.java127 Injector injector = in testInstallingInjectionListener() local
146 Object a1 = injector.getInstance(A.class); in testInstallingInjectionListener()
149 Object a2 = injector.getInstance(A.class); in testInstallingInjectionListener()
152 Object b1 = injector.getInstance(B.class); in testInstallingInjectionListener()
155 Provider<A> aProvider = injector.getProvider(A.class); in testInstallingInjectionListener()
177 Injector injector =
198 C c = injector.getInstance(C.class);
239 Injector injector =
248 injector.getProvider(B.class);
261 injector.getInstance(B.class);
[all …]
/external/cronet/base/message_loop/
Dmessage_pump_glib_unittest.cc45 source_->injector = this; in EventInjector()
113 raw_ptr<EventInjector> injector; member
129 *timeout_ms = static_cast<Source*>(source)->injector->HandlePrepare(); in Prepare()
134 return static_cast<Source*>(source)->injector->HandleCheck(); in Check()
140 static_cast<Source*>(source)->injector->HandleDispatch(); in Dispatch()
159 void ExpectProcessedEvents(EventInjector* injector, int count) { in ExpectProcessedEvents() argument
160 EXPECT_EQ(injector->processed_events(), count); in ExpectProcessedEvents()
177 EventInjector* injector() { return &injector_; } in injector() function in base::__anon993e11fd0111::MessagePumpGLibTest
192 EXPECT_EQ(0, injector()->processed_events()); in TEST_F()
194 injector()->Reset(); in TEST_F()
[all …]
/external/guice/extensions/testlib/test/com/google/inject/testing/fieldbinder/
DBoundFieldModuleTest.java59 Injector injector = Guice.createInjector(module); in testBindingOnePrivate() local
61 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingOnePrivate()
72 Injector injector = Guice.createInjector(module); in testBindingOnePublic() local
74 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingOnePublic()
95 Injector injector = Guice.createInjector(module); in testSuperTypeBinding() local
97 assertEquals(instance.anInt, injector.getInstance(Integer.class)); in testSuperTypeBinding()
110 Injector injector = Guice.createInjector(module); in testBindingTwo() local
112 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingTwo()
113 assertEquals(testString, injector.getInstance(String.class)); in testBindingTwo()
125 Injector injector = Guice.createInjector(module); in testBindingSuperType() local
[all …]
/external/guice/extensions/persist/test/com/google/inject/persist/jpa/
DManagedLocalTransactionsAcrossRequestTest.java37 private Injector injector; field in ManagedLocalTransactionsAcrossRequestTest
46 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
49 injector.getInstance(PersistService.class).start(); in setUp()
54 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
58 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleTransaction()
60 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
68 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
76 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
80 EntityManager emOrig = injector.getInstance(EntityManager.class); in testSimpleTransactionWithMerge()
82 injector.getInstance(TransactionalObject.class).runOperationInTxnWithMerge(); in testSimpleTransactionWithMerge()
[all …]
DManagedLocalTransactionsTest.java35 private Injector injector; field in ManagedLocalTransactionsTest
42 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
45 injector.getInstance(PersistService.class).start(); in setUp()
50 injector.getInstance(UnitOfWork.class).end(); in tearDown()
51 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
55 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleTransaction()
57 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
65 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
77 injector.getInstance(TransactionalObject.class).runOperationInTxnWithMerge(); in testSimpleTransactionWithMerge()
79 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransactionWithMerge()
[all …]
DJpaWorkManagerTest.java35 private Injector injector; field in JpaWorkManagerTest
43 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
46 injector.getInstance(PersistService.class).start(); in setUp()
52 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
59 injector.getInstance(UnitOfWork.class).begin(); in testWorkManagerInSession()
61 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testWorkManagerInSession()
63 injector.getInstance(UnitOfWork.class).end(); in testWorkManagerInSession()
66 injector.getInstance(UnitOfWork.class).begin(); in testWorkManagerInSession()
67 injector.getInstance(EntityManager.class).getTransaction().begin(); in testWorkManagerInSession()
70 injector in testWorkManagerInSession()
[all …]
DJoiningLocalTransactionsTest.java35 private Injector injector; field in JoiningLocalTransactionsTest
43 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
46 injector.getInstance(PersistService.class).start(); in setUp()
52 injector.getInstance(UnitOfWork.class).end(); in tearDown()
53 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
57 injector in testSimpleTransaction()
61 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
69 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
81 injector in testSimpleTransactionRollbackOnChecked()
86 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransactionRollbackOnChecked()
[all …]
DEntityManagerPerRequestProvisionTest.java36 private Injector injector; field in EntityManagerPerRequestProvisionTest
40 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
43 injector.getInstance(PersistService.class).start(); in setUp()
45 injector.getInstance(UnitOfWork.class).begin(); in setUp()
50 injector.getInstance(UnitOfWork.class).end(); in tearDown()
51 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
56 JpaDao dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn()
66 injector.getInstance(EntityManager.class), in testEntityManagerLifecyclePerTxn()
70 dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn()
80 JpaDao dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn2()
[all …]
DManualLocalTransactionsTest.java38 private Injector injector; field in ManualLocalTransactionsTest
44 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
47 injector.getInstance(PersistService.class).start(); in setUp()
52 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
56 injector.getInstance(UnitOfWork.class).begin(); in testSimpleCrossTxnWork()
59 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleCrossTxnWork()
61 JpaTestEntity entity = injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleCrossTxnWork()
62 injector.getInstance(TransactionalObject.class).runOperationInTxn2(); in testSimpleCrossTxnWork()
67 injector.getInstance(EntityManager.class).contains(entity)); in testSimpleCrossTxnWork()
71 injector.getInstance(UnitOfWork.class).end(); in testSimpleCrossTxnWork()
[all …]
/external/robolectric/utils/src/test/java/org/robolectric/util/inject/
DInjectorTest.java24 private Injector injector; field in InjectorTest
30 injector = builder.build(); in setUp()
35 injector = builder.bind(Thing.class, MyThing.class).build(); in whenImplSpecified_shouldProvideInstance()
37 assertThat(injector.getInstance(Thing.class)) in whenImplSpecified_shouldProvideInstance()
43 injector = builder.bind(Thing.class, MyThing.class).build(); in whenImplSpecified_shouldUseSameInstance()
45 Thing thing = injector.getInstance(Thing.class); in whenImplSpecified_shouldUseSameInstance()
46 assertThat(injector.getInstance(Thing.class)).isSameInstanceAs(thing); in whenImplSpecified_shouldUseSameInstance()
51 assertThat(injector.getInstance(Thing.class)) in whenServiceSpecified_shouldProvideInstance()
57 Thing thing = injector.getInstance(Thing.class); in whenServiceSpecified_shouldUseSameInstance()
58 assertThat(injector.getInstance(Thing.class)).isSameInstanceAs(thing); in whenServiceSpecified_shouldUseSameInstance()
[all …]
/external/guice/core/test/com/google/inject/internal/
DOptionalBinderTest.java160 Injector injector = Guice.createInjector(module); in testOptionalIsAbsentByDefault() local
161 Optional<String> optional = injector.getInstance(Key.get(optionalOfString)); in testOptionalIsAbsentByDefault()
164 Optional<Provider<String>> optionalP = injector.getInstance(Key.get(optionalOfProviderString)); in testOptionalIsAbsentByDefault()
168 injector.getInstance(Key.get(optionalOfJavaxProviderString)); in testOptionalIsAbsentByDefault()
174 optional = toOptional(injector.getInstance(Key.get(javaOptionalOfString))); in testOptionalIsAbsentByDefault()
177 optionalP = toOptional(injector.getInstance(Key.get(javaOptionalOfProviderString))); in testOptionalIsAbsentByDefault()
180 optionalJxP = toOptional(injector.getInstance(Key.get(javaOptionalOfJavaxProviderString))); in testOptionalIsAbsentByDefault()
199 Injector injector = Guice.createInjector(module); in testUsesUserBoundValue() local
200 assertEquals("foo", injector.getInstance(String.class)); in testUsesUserBoundValue()
202 Optional<String> optional = injector.getInstance(Key.get(optionalOfString)); in testUsesUserBoundValue()
[all …]
/external/guice/core/test/com/google/inject/spi/
DModuleAnnotatedMethodScannerTest.java65 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testScanning() local
68 assertMungedBinding(injector, String.class, "foo", "foo"); in testScanning()
69 assertMungedBinding(injector, String.class, "foo2", "foo2"); in testScanning()
71 Binding<String> fooBinding = injector.getBinding(Key.get(String.class, named("foo-munged"))); in testScanning()
72 Binding<String> foo2Binding = injector.getBinding(Key.get(String.class, named("foo2-munged"))); in testScanning()
98 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testSkipSources() local
99 assertMungedBinding(injector, String.class, "foo", "foo"); in testSkipSources()
120 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testWithSource() local
121 assertMungedBinding(injector, String.class, "foo", "foo"); in testWithSource()
195 Injector injector, Class<?> clazz, String originalName, Object expectedValue) {
[all …]
DProviderMethodsTest.java71 Injector injector = Guice.createInjector(this); in testProviderMethods() local
73 Bob bob = injector.getInstance(Bob.class); in testProviderMethods()
76 Bob clone = injector.getInstance(Bob.class); in testProviderMethods()
83 assertSame(injector.getInstance(soleBobKey), injector.getInstance(soleBobKey)); in testProviderMethods()
148 Injector injector =
185 Foo foo = injector.getInstance(Foo.class);
232 Injector injector =
235 assertEquals("A", injector.getInstance(Key.get(String.class, Names.named("First"))));
236 assertEquals("B", injector.getInstance(Key.get(String.class, Names.named("Second"))));
238 ImmutableSet.of("A", "B"), injector.getInstance(Key.get(Types.setOf(String.class))));
[all …]
/external/guice/extensions/servlet/test/com/google/inject/servlet/
DFilterDefinitionTest.java38 Injector injector = createMock(Injector.class); in testFilterInitAndConfig() local
44 expect(injector.getBinding(Key.get(Filter.class))).andReturn(binding); in testFilterInitAndConfig()
46 expect(injector.getInstance(Key.get(Filter.class))).andReturn(mockFilter).anyTimes(); in testFilterInitAndConfig()
48 replay(binding, injector); in testFilterInitAndConfig()
71 filterDef.init(servletContext, injector, Sets.<Filter>newIdentityHashSet()); in testFilterInitAndConfig()
87 verify(binding, injector, servletContext); in testFilterInitAndConfig()
91 Injector injector = createMock(Injector.class); in testFilterCreateDispatchDestroy() local
98 expect(injector.getBinding(Key.get(Filter.class))).andReturn(binding); in testFilterCreateDispatchDestroy()
100 expect(injector.getInstance(Key.get(Filter.class))).andReturn(mockFilter).anyTimes(); in testFilterCreateDispatchDestroy()
105 replay(injector, binding, request); in testFilterCreateDispatchDestroy()
[all …]
DServletTest.java83 Injector injector = in testScopeExceptions() local
112 injector.getInstance(String.class); in testScopeExceptions()
119 injector.getInstance(Integer.class); in testScopeExceptions()
127 injector.getInstance(key); in testScopeExceptions()
135 final Injector injector = createInjector(); in testRequestAndResponseBindings() local
147 assertSame(request, injector.getInstance(ServletRequest.class)); in testRequestAndResponseBindings()
148 assertSame(request, injector.getInstance(HTTP_REQ_KEY)); in testRequestAndResponseBindings()
151 assertSame(response, injector.getInstance(ServletResponse.class)); in testRequestAndResponseBindings()
152 assertSame(response, injector.getInstance(HTTP_RESP_KEY)); in testRequestAndResponseBindings()
154 assertSame(servletRequest.getParameterMap(), injector.getInstance(REQ_PARAMS_KEY)); in testRequestAndResponseBindings()
[all …]
/external/guice/extensions/spring/test/com/google/inject/spring/
DSpringIntegrationTest.java44 Injector injector = in testBindFromSpring() local
55 assertNotNull(injector.getInstance(Singleton.class)); in testBindFromSpring()
56 assertSame(injector.getInstance(Singleton.class), injector.getInstance(Singleton.class)); in testBindFromSpring()
58 assertNotNull(injector.getInstance(Prototype.class)); in testBindFromSpring()
59 assertNotSame(injector.getInstance(Prototype.class), injector.getInstance(Prototype.class)); in testBindFromSpring()
71 Injector injector = in testBindAll() local
83 assertNotNull(injector.getInstance(singletonKey)); in testBindAll()
84 assertSame(injector.getInstance(singletonKey), injector.getInstance(singletonKey)); in testBindAll()
86 assertNotNull(injector.getInstance(prototypeKey)); in testBindAll()
87 assertNotSame(injector.getInstance(prototypeKey), injector.getInstance(prototypeKey)); in testBindAll()
/external/guice/core/test/com/googlecode/guice/
DJsr330Test.java60 Injector injector = in testInject() local
73 A a = injector.getInstance(A.class); in testInject()
81 Injector injector = in testQualifiedInject() local
94 F f = injector.getInstance(F.class); in testQualifiedInject()
102 Injector injector = in testProviderInject() local
115 G g = injector.getInstance(G.class); in testProviderInject()
125 Injector injector = in testScopeAnnotation() local
136 B b = injector.getInstance(B.class); in testScopeAnnotation()
137 assertSame(b, injector.getInstance(B.class)); in testScopeAnnotation()
138 assertSame(b, injector.getInstance(B.class)); in testScopeAnnotation()
[all …]

12345678910