protected virtual ChartData.StripLine[] GetStripLines(long studentUSI, int metricId, int metricVariantId, int schoolId, string format) { var metricInstanceSetKey = _metricInstanceSetKeyResolver.GetMetricInstanceSetKey(StudentSchoolMetricInstanceSetRequest.Create(schoolId, studentUSI, metricVariantId)); var metricGoal = _metricGoalProvider.GetMetricGoal(metricInstanceSetKey, metricId); if (metricGoal == null || metricGoal.Value == null) { return(new ChartData.StripLine[0]); } //If we have a goal then add a StripLine. var stripLine = new ChartData.StripLine { Value = Convert.ToDouble(metricGoal.Value), IsNegativeThreshold = metricGoal.Interpretation == TrendInterpretation.Inverse }; return(new[] { stripLine }); }
protected override void ExecuteTest() { var suppliedRequest = new StudentSchoolMetricInstanceSetRequest { SchoolId = suppliedSchoolId, StudentUSI = suppliedStudentUSI, MetricVariantId = suppliedMetricVariantId }; var service = new StudentSchoolMetricDataService(metricInstanceRepository, metricInstanceExtendedPropertyRepository, metricComponentRepository); var provider = new StudentSchoolMetricDataProvider(service, schoolBriefService, metricInstanceSetKeyResolver, warehouseAvailabilityProvider, maxPriorYearProvider); actualModel = provider.Get(suppliedRequest); }
protected override void EstablishContext() { suppliedRequest = new StudentSchoolMetricInstanceSetRequest { SchoolId = suppliedSchoolId, StudentUSI = suppliedStudentUSI, MetricVariantId = suppliedMetricVariantId }; schoolBriefService = mocks.StrictMock<IBriefService>(); metricInstanceSetKeyResolver = mocks.StrictMock<IMetricInstanceSetKeyResolver<StudentSchoolMetricInstanceSetRequest>>(); warehouseAvailabilityProvider = mocks.StrictMock<IWarehouseAvailabilityProvider>(); maxPriorYearProvider = mocks.StrictMock<IMaxPriorYearProvider>(); studentSchoolMetricDataService = mocks.StrictMock<IStudentSchoolMetricDataService>(); Expect.Call(warehouseAvailabilityProvider.Get()).Return(false); }
protected override void EstablishContext() { suppliedRequest = new StudentSchoolMetricInstanceSetRequest { SchoolId = suppliedSchoolId, StudentUSI = suppliedStudentUSI, MetricVariantId = suppliedMetricVariantId }; base.EstablishContext(); }