protected override void EstablishContext() { metricMetadataTreeService = mocks.StrictMock<IMetricMetadataTreeService>(); suppliedMetricMetadataTree = GetSuppliedMetadataTree(); providerToTest = new MetricStateProvider(metricMetadataTreeService); }
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 suppliedMetadataTree = GetSuppliedMetricMetadataTree(); //Set up the mocks dashboardContextProvider = mocks.StrictMock<IEdFiDashboardContextProvider>(); metricMetadataTreeService = mocks.StrictMock<IMetricMetadataTreeService>(); rootMetricNodeResolver = mocks.StrictMock<IRootMetricNodeResolver>(); //Set expectations Expect.Call(metricMetadataTreeService.Get(null)).IgnoreArguments().Return(suppliedMetadataTree); }
protected override void EstablishContext() { //Prepare supplied data collections suppliedStudentInformationData = GetSuppliedStudentInformation(); suppliedStudentSchoolMetricInstanceSetData = GetSuppliedStudentSchoolMetricInstanceSet(); suppliedMetricInstanceData = GetSuppliedMetricInstance(); suppliedMetricHierarchy = GetSuppliedMetadataHierarchy(); //Set up the mocks studentInformationRepository = mocks.StrictMock<IRepository<StudentInformation>>(); StudentSchoolMetricInstanceSetRepository = mocks.StrictMock<IRepository<StudentSchoolMetricInstanceSet>>(); metricInstanceRepository = mocks.StrictMock<IRepository<MetricInstance>>(); rootMetricNodeResolver = mocks.StrictMock<IRootMetricNodeResolver>(); //Set expectations Expect.Call(studentInformationRepository.GetAll()).Return(suppliedStudentInformationData); Expect.Call(StudentSchoolMetricInstanceSetRepository.GetAll()).Return(suppliedStudentSchoolMetricInstanceSetData); Expect.Call(metricInstanceRepository.GetAll()).Return(suppliedMetricInstanceData); Expect.Call(rootMetricNodeResolver.GetRootMetricNodeForStudent(suppliedSchoolId)).Return(suppliedMetricHierarchy.Children.First()); }
private MetricMetadataNode GetRootMetricNode(MetricMetadataTree tree) { MetricMetadataNode value; tree.AllNodesByMetricNodeId.TryGetValue(suppliedRootNodeId, out value); return value; }
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>(); }