protected override void EstablishContext()
        {
            schoolMetricInstanceTeacherListRepository = mocks.StrictMock<IRepository<SchoolMetricInstanceTeacherList>>();
            staffInformationRepository = mocks.StrictMock<IRepository<StaffInformation>>();
            staffEdOrgRepository = mocks.StrictMock<IRepository<StaffEducationOrgInformation>>();
            uniqueListProvider = mocks.StrictMock<IUniqueListIdProvider>();
            metricNodeResolver = mocks.StrictMock<IMetricNodeResolver>();
            staffLinks = mocks.StrictMock<IStaffAreaLinks>();
            codeIdProvider = mocks.StrictMock<ICodeIdProvider>();
            localEducationAgencyContextProvider = mocks.StrictMock<ILocalEducationAgencyContextProvider>();
            warehouseAvailabilityProvider = mocks.StrictMock<IWarehouseAvailabilityProvider>();
            maxPriorYearProvider = mocks.StrictMock<IMaxPriorYearProvider>();

            Expect.Call(warehouseAvailabilityProvider.Get()).Return(suppliedWarehouseAvailability);

            if (suppliedWarehouseAvailability)
            {
                Expect.Call(metricNodeResolver.GetMetricNodeForSchoolFromMetricVariantId(-1, -1)).IgnoreArguments().Return(GetMetricMetadataNode());
                Expect.Call(localEducationAgencyContextProvider.GetCurrentLocalEducationAgencyCode()).Return("Code");
                Expect.Call(codeIdProvider.Get("Code")).Return(1);
                Expect.Call(maxPriorYearProvider.Get(1)).Return(2012);
                Expect.Call(schoolMetricInstanceTeacherListRepository.GetAll()).Return(GetSuppliedSchoolMetricInstanceTeacherList());
                Expect.Call(uniqueListProvider.GetUniqueId(suppliedMetricVariantId)).Return(suppliedUniqueId);


                if (isStaffCountGreaterThanZero)
                {
                    Expect.Call(staffEdOrgRepository.GetAll()).Return(GetSuppliedStaffEdOrg());
                    Expect.Call(staffInformationRepository.GetAll()).Return(GetStaffInformation());
                    Expect.Call(staffLinks.Default(-1, -1, string.Empty, null, null, null)).IgnoreArguments().Return(string.Empty);
                }
            }

            base.EstablishContext();
        }
 public WatchListSearchLinkProvider(IStaffAreaLinks staffAreaLinks,
     ILocalEducationAgencyAreaLinks localEducationAgencyAreaLinks,
     IWatchListLinkProvider watchListLinkProvider,
     IRepository<MetricBasedWatchListOption> metricBasedWatchListOptionRepository,
     IService<MetricsBasedWatchListMenuRequest, List<StudentListMenuModel>> metricsBasedWatchListMenuService)
 {
     StaffAreaLinks = staffAreaLinks;
     LocalEducationAgencyAreaLinks = localEducationAgencyAreaLinks;
     WatchListLinkProvider = watchListLinkProvider;
     MetricBasedWatchListOptionRepository = metricBasedWatchListOptionRepository;
     MetricsBasedWatchListMenuService = metricsBasedWatchListMenuService;
 }
        protected override void EstablishContext()
        {
            staffCustomStudentListRepository = new Mock<IPersistingRepository<StaffCustomStudentList>>();
            staffCustomStudentListStudentRepository = new Mock<IPersistingRepository<StaffCustomStudentListStudent>>();
            cacheProvider = new Mock<ICacheProvider>();
            localEducationAgencyAreaLinks = new LocalEducationAgencyAreaLinksFake();
            staffAreaLinks = new StaffAreaLinksFake();

            suppliedCustomStudentListData = GetSuppliedCustomStudentListData();
            suppliedCustomStudentListStudentData = GetSuppliedCustomStudentListStudentData();

            staffCustomStudentListRepository.Setup(x => x.GetAll()).Returns(suppliedCustomStudentListData);
            staffCustomStudentListStudentRepository.Setup(x => x.GetAll()).Returns(suppliedCustomStudentListStudentData);
        }
        protected override void EstablishContext()
        {
            staffAreaLinks = mocks.StrictMock<IStaffAreaLinks>();

            base.EstablishContext();
        }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WatchListLinkProvider" /> class.
 /// </summary>
 /// <param name="staffAreaLinks">The staff area links.</param>
 /// <param name="schoolAreaLinks">The school area links.</param>
 /// <param name="localEducationAgencyAreaLinks">The local education agency area links.</param>
 public WatchListLinkProvider(
     IStaffAreaLinks staffAreaLinks,
     ISchoolAreaLinks schoolAreaLinks,
     ILocalEducationAgencyAreaLinks localEducationAgencyAreaLinks)
 {
     StaffAreaLinks = staffAreaLinks;
     SchoolAreaLinks = schoolAreaLinks;
     LocalEducationAgencyAreaLinks = localEducationAgencyAreaLinks;
 }