public void TestInit() { _dynamicTypeManager = Mock.Create<IDynamicTypeManager>(Behavior.Loose); _filterManager = Mock.Create<IFilterManager>(Behavior.Loose); _layoutManager = Mock.Create<ILayoutManager>(Behavior.Loose); _searchUtils = Mock.Create<ISearchUtils>(Behavior.Loose); _processMetadataRepository = Mock.Create<IProcessMetadataRepository>(Behavior.Loose); _filterDescriptorFactory = Mock.Create<IFilterDescriptorFactory>(Behavior.Loose); _metricsManager = Mock.Create<IMetricsManager>(Behavior.Loose); _kpiManager = Mock.Create<IKPIManager>(Behavior.Loose); _filterRepository = Mock.Create<IFilterRepository>(Behavior.Loose); _processMetadata = Mock.Create<IProcessMetadata>(Behavior.Loose); Mock.Arrange(() => _processMetadata.Name).Returns(ProcessName); Mock.Arrange(() => _processMetadataRepository.GetProcessMetadata(ProcessName)).Returns(_processMetadata); }
public FilterMetadataFactory( IProcessMetadataRepository processRepository, IFilterDescriptorFactory filterDescriptorFactory, IFilteringUtils filteringUtils) { if (processRepository == null) throw new ArgumentNullException("processRepository"); if (filterDescriptorFactory == null) throw new ArgumentNullException("filterDescriptorFactory"); if (filteringUtils == null) throw new ArgumentNullException("filteringUtils"); _processMetadataRepository = processRepository; _filterDescriptorFactory = filterDescriptorFactory; _filteringUtils = filteringUtils; }
/// <summary> /// Initializes a new instance of the <see cref="SearchCommand"/> class. /// </summary> /// <param name="process"> /// The process metadata. /// </param> /// <param name="dynamicTypeManager"> /// The dynamic type manager. /// </param> /// <param name="filterManager"> /// The filter manager. /// </param> /// <param name="layoutManager"> /// The layout manager. /// </param> /// <param name="searchUtils"> /// The search utils. /// </param> /// <param name="filterDescriptorFactory"> /// The filter descriptor factory. /// </param> /// <param name="metricsManager"> /// The metrics manager. /// </param> /// <param name="kpiManager"> /// The KPI manager. /// </param> /// <param name="filterRepository"> /// The filter repository. /// </param> public SearchCommand( IProcessMetadata process, IDynamicTypeManager dynamicTypeManager, IFilterManager filterManager, ILayoutManager layoutManager, ISearchUtils searchUtils, IFilterDescriptorFactory filterDescriptorFactory, IMetricsManager metricsManager, IKPIManager kpiManager, IFilterRepository filterRepository) { if (process == null) throw new ArgumentNullException("process"); if (dynamicTypeManager == null) throw new ArgumentNullException("dynamicTypeManager"); if (filterManager == null) throw new ArgumentNullException("filterManager"); if (layoutManager == null) throw new ArgumentNullException("layoutManager"); if (searchUtils == null) throw new ArgumentNullException("searchUtils"); if (filterDescriptorFactory == null) throw new ArgumentNullException("filterDescriptorFactory"); if (metricsManager == null) throw new ArgumentNullException("metricsManager"); if (kpiManager == null) throw new ArgumentNullException("kpiManager"); if (filterRepository == null) throw new ArgumentNullException("filterRepository"); _dynamicTypeManager = dynamicTypeManager; _filterManager = filterManager; _layoutManager = layoutManager; _searchUtils = searchUtils; _filterDescriptorFactory = filterDescriptorFactory; _metricsManager = metricsManager; _kpiManager = kpiManager; _filterRepository = filterRepository; _process = process; }