public void TestInitialize()
 {
     shell = Substitute.For<ShellViewModel>();
     serviceControl = Substitute.For<IServiceControl>();
     settingsProvider = Substitute.For<ISettingsProvider>();
     connection = Substitute.For<ServiceControlConnectionProvider>();
     container = RegisterContainer();
     storedSetting = GetReloadedSettings();
     settingsProvider.GetSettings<ProfilerSettings>().Returns(storedSetting);
     connectTo = new ServiceControlConnectionViewModel(settingsProvider, container) { Parent = shell }; //TODO: Do we need to pass the full container here?
 }
 public DefaultServiceControl(
     ServiceControlConnectionProvider connection,
     IEventAggregator eventAggregator,
     ISettingsProvider settingsProvider)
 {
     this.connection      = connection;
     this.eventAggregator = eventAggregator;
     settings             = settingsProvider.GetSettings <ProfilerSettings>();
     cache = new MemoryCache("ServiceControlReponses", new NameValueCollection(1)
     {
         { "cacheMemoryLimitMegabytes", settings.CacheSize.ToString() }
     });
 }