A design pattern to reduce coupling between components, by dynamically injecting into a software component dependencies that it needs to function.

learn more…| top users | synonyms (1)

0
votes
1answer
11 views

Moq: verifying calls to indexed properties in a dictionary

I am trying to mock a class that contains a dictionary, and verify calls to specific indexes of the dictionary. The interface to the class looks like: public interface IClassWithADictionary{...
0
votes
0answers
5 views

Script for angular-google-analytics is not loading

I try to use angular-google-analytics for tracking traffic. I'm using angular 1.4.8.Version of angular-google-analytics is 1.1.9. I included it in my bower.json file and linked script in my template....
0
votes
0answers
9 views

Mocking class instantiated in other class in Magento

I'm trying to learn more on testing but unfortunately I have to do it in Magento 1.9.* :)Consider the following code (GDPR related)...class Vendor_Module_Helper_Data {public function ...
0
votes
0answers
12 views

How to save a build profile for multiple services without a parent pom

Basically I want to capture the behavior of a parent pom without creating a dependency in order to keep modules more portable. Is there any way to create a static definition of a build configuration ...
0
votes
2answers
32 views

extending classes with dependency injection in angular 4

I'm using angular cli and angular 4.I've made some classes from which my components inherit behavivour! However during development their constructores grow and in the current phase I need to be able ...
1
vote
0answers
12 views

Why does Autofac.config fail to load in [ClassInitialize] when running all tests?

I have a class initialize method that runs sets up an autofac.config amoung other dependencies in mstest. When I run the tests in the file individually they pass. however when I run the tests together ...
1
vote
1answer
8 views

Registering instances from property of other registered types?

Is there a better way to code this dependency on Configuration, how can I register an object which is provided by a property of another registered object?I have a configuration object which exposes ...
1
vote
1answer
28 views

How to use DI(AutoFac) with a Service Layer

I have an MVC app using a 3-tier pattern: DAL <-> Service <-> UI and I'm trying to add AutoFac for testing my MVC controllers as well as services.A couple questions:1) How do I use AutoFac ...
0
votes
0answers
6 views

How does Blueprint resolves prototype in singleton?

Say, I have singleton bean S and prototype bean P. After injecting P into S using Blueprint DSL I assume, that every call to P (through S) returns new instance of P. But there always returns the same ...
0
votes
0answers
7 views

How to load modules in zf2 from database

i would like to know if there's a way to have application module in zf2 that look in database and load other modules based on a table, maybe this could be a duplicate from:ZF2/3 Load Modules from ...
-1
votes
1answer
21 views

Angular5 providers based DI issue

I have a custom class (non module) in angular 5, i would like to use this class implements the CanActivate interface because i would like to use this as route guard.import { Injectable } from '@...
0
votes
1answer
26 views

Spring ThreadPoolTaskExecutor Autowiring Different Instance

I'm using Spring Boot and have configured a ThreadPoolTaskExecutor as follows:@Data@Configurationpublic class WorkflowThreadConfig {@Value("${threadConfig.corePoolSize}")...
1
vote
2answers
57 views

.NET Core Singleton Creation is called multiple times

I'm registering a service as a singleton in .NET Core. Yet I'm seeing the constructor for the singleton called multiple times.services.AddSingleton<DbAuthorizationOptions, ...
-5
votes
3answers
84 views

Tightly or loose coupled with static methods [on hold]

public Interface IFoo(){void DoSomething();}public class Foo{private IFoo _ifoo;public Foo(IFoo foo){_ifoo=foo;}public void Bar(){// ...
-3
votes
0answers
32 views

Why HttpClient is injected? [duplicate]

I'm looking at HttpClient documentation and Google gives an example of using HttpClient:import { Injectable } from '@angular/core';import { HttpClient } from '@angular/common/http';@Injectable()...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,