public MetricGoalProvider(IMetricMetadataTreeService metricMetadataNodeService, IMetricGoalsService metricGoalsService, IMetricInstancesService metricInstancesService) { this.metricMetadataNodeService = metricMetadataNodeService; this.metricGoalsService = metricGoalsService; this.metricInstancesService = metricInstancesService; }
protected override void EstablishContext() { suppliedMetricInstanceSetKey_ForWantedData = new Guid("56cff024-f54a-4a7f-89c2-5af94a4660da"); suppliedRequest = new TestMetricInstanceSetRequestBase(); //Use mock data metricInstanceSetKeyResolver = mocks.StrictMock<IMetricInstanceSetKeyResolver<TestMetricInstanceSetRequestBase>>(); Expect.Call(metricInstanceSetKeyResolver.GetMetricInstanceSetKey(suppliedRequest)).Return(suppliedMetricInstanceSetKey_ForWantedData); metricInstancesService = mocks.StrictMock<IMetricInstancesService>(); Expect.Call(metricInstancesService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricInstanceData()); metricInstanceExtendedPropertiesService = mocks.StrictMock<IMetricInstanceExtendedPropertiesService>(); Expect.Call(metricInstanceExtendedPropertiesService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricInstanceExtendedPropertyData()); metricComponentsService = mocks.StrictMock<IMetricComponentsService>(); Expect.Call(metricComponentsService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricComponentData()); metricGoalsService = mocks.StrictMock<IMetricGoalsService>(); Expect.Call(metricGoalsService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricGoalData()); metricIndicatorsService = mocks.StrictMock<IMetricIndicatorsService>(); Expect.Call(metricIndicatorsService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricIndicatorData()); metricFootnoteDescType = mocks.StrictMock<IMetricFootnoteDescriptionTypesService>(); Expect.Call(metricFootnoteDescType.Get(null)).IgnoreArguments().Return(getSuppliedMetricFootnotDescTypeData()); metricInstanceFootnotesService = mocks.StrictMock<IMetricInstanceFootnotesService>(); Expect.Call(metricInstanceFootnotesService.Get(null)).IgnoreArguments().Return(GetSuppliedMetricFootnoteData()); }
protected override void EstablishContext() { metricGoalsService = mocks.StrictMock<IMetricGoalsService>(); metricMetadataTreeService = mocks.StrictMock<IMetricMetadataTreeService>(); metricInstancesService = mocks.StrictMock<IMetricInstancesService>(); cacheProvider = mocks.StrictMock<ICacheProvider>(); suppliedMetricGoalData = GetSuppliedMetricGoalData(); suppliedMetricMetadataTree = GetSuppliedMetaDataNode(); suppliedMetricInstanceData = GetSuppliedMetricInstance(); }
protected override void EstablishContext() { //Prepare supplied data collections suppliedMetricData = GetSuppliedMetricData(); suppliedMetricMetadataTree = GetSuppliedMetricMetadataTree(); //Set up the mocks metricMetadataNodeService = mocks.StrictMock<IMetricMetadataTreeService>(); metricGoalsService = mocks.StrictMock<IMetricGoalsService>(); metricInstancesService = mocks.StrictMock<IMetricInstancesService>(); cacheProvider = mocks.StrictMock<ICacheProvider>(); }