I am currently into the testing stage of a project I am working on and am having trouble bringing the main service under test in anything other than the most basic default test cases.
The Service is currently responsible for the creation of all sub-components, which I would like to change to use an IoC container.
What container should I use to refactor quickly to a simple IoC setup, all I need is to inject the componets lsited in the following constructor:
public DataService(string applicationFolder, string pluginFolder,
string persistantCacheDirectory, string settingsFolder,
string colorsFolder, string templatesFolder)
{
_DataSourceLoaderPlugins = new DataSourceLoaderPlugins(pluginFolder,
applicationFolder, defaultConnectionString);
_DataSourcesService = new DataSourceService(_DataSourceLoaderPlugins);
_ChartPlugins = new ChartPlugins(pluginFolder);
//... and about 10 more dependencies
}
I am new to IoC containers, and I'm not quite sure what the best framework for my basic needs is.
The component constructors do need some parameters from the application settings in the web.config, that will be as complicated as it gets for this project.
This service also needs to have singleton scope.
What suggestions do people have? what framework is simple, easy to setup and get under way?