protected override void EstablishContext() { studentMetricRepository = mocks.StrictMock<IRepository<StudentMetric>>(); Expect.Call(studentMetricRepository.GetAll()).Return(new List<StudentMetric>().AsQueryable()).Repeat.Any(); metricInstanceExtendedPropertyWithValueToFloatRepository = mocks.StrictMock<IRepository<MetricInstanceExtendedPropertyWithValueToFloat>>(); Expect.Call(metricInstanceExtendedPropertyWithValueToFloatRepository.GetAll()).Return(new List<MetricInstanceExtendedPropertyWithValueToFloat>().AsQueryable()).Repeat.Any(); query = new List<EnhancedStudentInformation> { new EnhancedStudentInformation { StudentUSI = 1, SchoolId = 1}, new EnhancedStudentInformation { StudentUSI = 2, SchoolId = 1 }, }.AsQueryable(); filter = new MetricOptionsFilter(studentMetricRepository, metricInstanceExtendedPropertyWithValueToFloatRepository); base.EstablishContext(); }
protected override void EstablishContext() { studentMetricRepository = mocks.StrictMock<IRepository<StudentMetric>>(); Expect.Call(studentMetricRepository.GetAll()).Return(new List<StudentMetric> { new StudentMetric { MetricId = 1, SchoolId = 1, StudentUSI = 1, MetricInstanceSetKey = SuppliedMetricInstanceSetKey1, ValueSortOrder = 1.0d }, new StudentMetric { MetricId = 1, SchoolId = 1, StudentUSI = 2, MetricInstanceSetKey = SuppliedMetricInstanceSetKey2, ValueSortOrder = 2.0d }, new StudentMetric { MetricId = 1, SchoolId = 1, StudentUSI = 3, MetricInstanceSetKey = SuppliedMetricInstanceSetKey3, ValueSortOrder = 3.0d }, }.AsQueryable()).Repeat.Any(); metricInstanceExtendedPropertyWithValueToFloatRepository = mocks.StrictMock<IRepository<MetricInstanceExtendedPropertyWithValueToFloat>>(); Expect.Call(metricInstanceExtendedPropertyWithValueToFloatRepository.GetAll()) .Return(new List<MetricInstanceExtendedPropertyWithValueToFloat> { new MetricInstanceExtendedPropertyWithValueToFloat { MetricId = 1, MetricInstanceSetKey = SuppliedMetricInstanceSetKey1, Name = "Test", ValueToFloat = 2.0d }, new MetricInstanceExtendedPropertyWithValueToFloat { MetricId = 1, MetricInstanceSetKey = SuppliedMetricInstanceSetKey2, Name = "Test", ValueToFloat = 2.0d }, new MetricInstanceExtendedPropertyWithValueToFloat { MetricId = 1, MetricInstanceSetKey = SuppliedMetricInstanceSetKey3, Name = "Test", ValueToFloat = 2.0d }, }.AsQueryable()).Repeat.Any(); query = new List<EnhancedStudentInformation> { new EnhancedStudentInformation { StudentUSI = 1, SchoolId = 1 }, new EnhancedStudentInformation { StudentUSI = 2, SchoolId = 1 }, new EnhancedStudentInformation { StudentUSI = 3, SchoolId = 1 }, }.AsQueryable(); filter = new MetricOptionsFilter(studentMetricRepository, metricInstanceExtendedPropertyWithValueToFloatRepository); base.EstablishContext(); }