public DispatchController(IDispatchAllocationService dispatchAllocationService, IDispatchService dispatchService, IUserProfileService userProfileService, IOtherDispatchAllocationService otherDispatchAllocationService, IDispatchDetailService dispatchDetailService, IUnitService unitService, ICommodityTypeService commodityTypeService, IProgramService programService, ITransporterService transporterService, IPeriodService periodService, ICommodityService commodityService, ITransactionService transactionService, IStoreService storeService, IAdminUnitService adminUnitService, IHubService hubService, IFDPService fdpService, IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService) { _dispatchAllocationService = dispatchAllocationService; _dispatchService = dispatchService; _userProfileService = userProfileService; _otherDispatchAllocationService = otherDispatchAllocationService; _dispatchDetailService = dispatchDetailService; _unitService = unitService; _commodityTypeService = commodityTypeService; _programService = programService; _transporterService = transporterService; _periodService = periodService; _commodityService = commodityService; _transactionService = transactionService; _storeService = storeService; _adminUnitService = adminUnitService; _hubService = hubService; _fdpService = fdpService; _projectCodeService = projectCodeService; _shippingInstructionService = shippingInstructionService; }
public DispatchAllocationController(IDispatchAllocationService dispatchAllocationService, IUserProfileService userProfileService, IOtherDispatchAllocationService otherDispatchAllocationService, IShippingInstructionService shippingInstructionService, IProjectCodeService projectCodeService, ITransporterService transporterService, ICommonService commonService, IAdminUnitService adminUnitService, IFDPService fdpService, IHubService hubService, ICommodityTypeService commodityTypeService) : base(userProfileService) { this._dispatchAllocationService = dispatchAllocationService; this._userProfileService = userProfileService; this._otherDispatchAllocationService = otherDispatchAllocationService; this._projectCodeService = projectCodeService; this._shippingInstructionService = shippingInstructionService; this._transporterService = transporterService; this._adminUnitService = adminUnitService; this._fdpService = fdpService; this._commonService = commonService; this._hubService = hubService; this._commodityTypeService = commodityTypeService; }
public DispatchController(IDispatchAllocationService dispatchAllocationService, IDispatchService dispatchService, IUserProfileService userProfileService, IOtherDispatchAllocationService otherDispatchAllocationService, IDispatchDetailService dispatchDetailService, IUnitService unitService, ICommodityTypeService commodityTypeService, IProgramService programService, ITransporterService transporterService, IPeriodService periodService, ICommodityService commodityService, ITransactionService transactionService, IStoreService storeService, IAdminUnitService adminUnitService, IHubService hubService, IFDPService fdpService, IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService, ISMSGatewayService smsGatewayService, IContactService contactService, ISMSService smsService) : base(userProfileService) { _dispatchAllocationService = dispatchAllocationService; _dispatchService = dispatchService; _userProfileService = userProfileService; _otherDispatchAllocationService = otherDispatchAllocationService; _dispatchDetailService = dispatchDetailService; _unitService = unitService; _commodityTypeService = commodityTypeService; _programService = programService; _transporterService = transporterService; _periodService = periodService; _commodityService = commodityService; _transactionService = transactionService; _storeService = storeService; _adminUnitService = adminUnitService; _hubService = hubService; _fdpService = fdpService; _projectCodeService = projectCodeService; _shippingInstructionService = shippingInstructionService; _smsGatewayService = smsGatewayService; _contactService = contactService; _smsService = smsService; }
public ProjectAllocationController(IRegionalRequestService reliefRequistionService , IFDPService fdpService , IAdminUnitService adminUnitService, IProgramService programService, ICommodityService commodityService, IRegionalRequestDetailService reliefRequisitionDetailService, IProjectCodeAllocationService projectCodeAllocationService, IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService, IHubService hubService, IHubAllocationService hubAllocationService, ILog log, IReliefRequisitionService requisitionService, ITransactionService transactionservice, ILedgerService ledgerService) { this._regionalRequestService = reliefRequistionService; this._adminUnitService = adminUnitService; this._commodityService = commodityService; this._fdpService = fdpService; this._programService = programService; this._reliefRequisitionDetailService = reliefRequisitionDetailService; this._projectCodeAllocationService = projectCodeAllocationService; this._projectCodeService = projectCodeService; this._shippingInstructionService = shippingInstructionService; this._hubService = hubService; this._hubAllocationService = hubAllocationService; this._requisitionService = requisitionService; this._transactionService = transactionservice; this._ledgerService = ledgerService; this._log = log; }
public FDPController(IFDPService FDPServiceParam, IAdminUnitService adminUnitService, IUserProfileService userProfileService) : base(userProfileService) { this._FDPService = FDPServiceParam; _adminUnitService = adminUnitService; }
public RegionalPSNPPlanDetailController( IRegionalPSNPPlanDetailService regionalPSNPPlanDetailServiceParam, IRegionalPSNPPlanService regionalPSNPPlanServiceParam, IRegionalRequestService regionalRequestServiceParam, IFDPService FDPServiceParam) { this._regionalPSNPPlanDetailService = regionalPSNPPlanDetailServiceParam; this._regionalPSNPPlanService = regionalPSNPPlanServiceParam; this._FDPService = FDPServiceParam; this._reqService = regionalRequestServiceParam; }
public RegionalPSNPPledgeController(IDonorService donorService, IFDPService fdpService, IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService, IRegionalPSNPPlanService regionalPSNPPlanService, IRegionalPSNPPledgeService regionalPSNPPledgeService, IAdminUnitService adminUnitService, ICommodityService commodityService, IRationDetailService rationDetailService, IUnitService unitService) { _donorService = donorService; _fdpService = fdpService; _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService; _regionalPSNPPlanService = regionalPSNPPlanService; _regionalPSNPPledgeService = regionalPSNPPledgeService; _adminUnitService = adminUnitService; _commodityService = commodityService; _rationDetailService = rationDetailService; _unitService = unitService; }
public FetchDataController(IRegionalDashboard regionalDashboard, IRegionalRequestService regionalRequestService, IReliefRequisitionService reliefRequisitionService, IAdminUnitService adminUnitService, IFDPService fdpService, IHRDService hrdService ) { _regionalDashboard = regionalDashboard; _regionalRequestService = regionalRequestService; _reliefRequisitionService = reliefRequisitionService; _adminUnitService = adminUnitService; _fdpService = fdpService; _hrdService = hrdService; }
public RegionalPSNPPledgeController(IDonorService donorService, IFDPService fdpService, IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService,IRegionalPSNPPlanService regionalPSNPPlanService, IRegionalPSNPPledgeService regionalPSNPPledgeService, IAdminUnitService adminUnitService, ICommodityService commodityService, IRationDetailService rationDetailService, IUnitService unitService) { _donorService = donorService; _fdpService = fdpService; _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService; _regionalPSNPPlanService = regionalPSNPPlanService; _regionalPSNPPledgeService = regionalPSNPPledgeService; _adminUnitService = adminUnitService; _commodityService = commodityService; _rationDetailService = rationDetailService; _unitService = unitService; }
public RequestControllerTest() { List<RegionalRequest> regionalRequestTest = new List<RegionalRequest>(); { new RegionalRequest { RegionalRequestID = 1, ProgramId = 1, Round = 2, RegionID = 9, ReferenceNumber = "AA1234", Year = 2012, Remark = "remarks" }; new RegionalRequest { RegionalRequestID = 2, ProgramId = 2, Round = 4, RegionID = 7, ReferenceNumber = "1234", Year = 2012, Remark = "" }; } ; List<AdminUnit> adminUnitTest=new List<AdminUnit>(); { new AdminUnit() {AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1}; } ; List<Commodity> commodityTest = new List<Commodity> { new Commodity { CommodityID = 5, Name = "Grain",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 6, Name = "Oil",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 8, Name = "CSB",LongName = "",CommodityTypeID = 1, ParentID = 3 }, }; //Mock the Regional Request Service Using Moq Mock<IRegionalRequestService> mockRegionalRequestService = new Mock<IRegionalRequestService>(); Mock<IFDPService> mockFDPService = new Mock<IFDPService>(); Mock<IAdminUnitService> mockAdminUnitService = new Mock<IAdminUnitService>(); Mock<IProgramService> mockProgramService = new Mock<IProgramService>(); Mock<ICommodityService> mockCommodityService = new Mock<ICommodityService>(); Mock<IRegionalRequestDetailService> mockRegionalRequestDetailService=new Mock<IRegionalRequestDetailService>(); // return all regional requests mockRegionalRequestService.Setup(m => m.GetAllReliefRequistion()).Returns(regionalRequestTest); mockRegionalRequestService.Setup(m => m.Get(t=>t.RegionalRequestID==2,null,null)); mockFDPService.Setup(m => m.GetAllFDP()).Returns(new List<FDP>()); mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID==2)).Returns(adminUnitTest); mockProgramService.Setup(m => m.GetAllProgram()).Returns(new List<Program>()); mockCommodityService.Setup(m => m.GetAllCommodity()).Returns(commodityTest); //return regional requests by id mockRegionalRequestService.Setup(mr => mr.FindById( It.IsAny<int>())).Returns((int i) => regionalRequestTest.Single(x => x.RegionalRequestID == i)); this.MockRegionalRequestService = mockRegionalRequestService.Object; this.MockAdminUnitService = mockAdminUnitService.Object; this.MockFdpService = mockFDPService.Object; this.MockProgramService = mockProgramService.Object; this.MockCommodityService = mockCommodityService.Object; this.MockRegionalRequestDetailService = mockRegionalRequestDetailService.Object; }
public FetchDataController(IRegionalDashboard regionalDashboard, IRegionalRequestService regionalRequestService, IReliefRequisitionService reliefRequisitionService, IAdminUnitService adminUnitService, IFDPService fdpService, IHRDService hrdService, IUtilizationHeaderSerivce utilization ) { _regionalDashboard = regionalDashboard; _regionalRequestService = regionalRequestService; _reliefRequisitionService = reliefRequisitionService; _adminUnitService = adminUnitService; _fdpService = fdpService; _hrdService = hrdService; _utilization = utilization; }
public ContactController(IContactService contactService, IFDPService fdpService) { _contactService = contactService; _fdpService = fdpService; }
public FDPController(IFDPService FDPServiceParam, IAdminUnitService adminUnitService) { this._FDPService = FDPServiceParam; _adminUnitService = adminUnitService; }
public RequestControllerTest() { List <RegionalRequest> regionalRequestTest = new List <RegionalRequest>(); { new RegionalRequest { RegionalRequestID = 1, ProgramId = 1, Round = 2, RegionID = 9, ReferenceNumber = "AA1234", Year = 2012, Remark = "remarks" }; new RegionalRequest { RegionalRequestID = 2, ProgramId = 2, Round = 4, RegionID = 7, ReferenceNumber = "1234", Year = 2012, Remark = "" }; } ; List <AdminUnit> adminUnitTest = new List <AdminUnit>(); { new AdminUnit() { AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1 }; } ; List <Commodity> commodityTest = new List <Commodity> { new Commodity { CommodityID = 5, Name = "Grain", LongName = "", CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 6, Name = "Oil", LongName = "", CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 8, Name = "CSB", LongName = "", CommodityTypeID = 1, ParentID = 3 }, }; //Mock the Regional Request Service Using Moq Mock <IRegionalRequestService> mockRegionalRequestService = new Mock <IRegionalRequestService>(); Mock <IFDPService> mockFDPService = new Mock <IFDPService>(); Mock <IAdminUnitService> mockAdminUnitService = new Mock <IAdminUnitService>(); Mock <IProgramService> mockProgramService = new Mock <IProgramService>(); Mock <ICommodityService> mockCommodityService = new Mock <ICommodityService>(); Mock <IRegionalRequestDetailService> mockRegionalRequestDetailService = new Mock <IRegionalRequestDetailService>(); // return all regional requests mockRegionalRequestService.Setup(m => m.GetAllReliefRequistion()).Returns(regionalRequestTest); mockRegionalRequestService.Setup(m => m.Get(t => t.RegionalRequestID == 2, null, null)); mockFDPService.Setup(m => m.GetAllFDP()).Returns(new List <FDP>()); mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID == 2)).Returns(adminUnitTest); mockProgramService.Setup(m => m.GetAllProgram()).Returns(new List <Program>()); mockCommodityService.Setup(m => m.GetAllCommodity()).Returns(commodityTest); //return regional requests by id mockRegionalRequestService.Setup(mr => mr.FindById( It.IsAny <int>())).Returns((int i) => regionalRequestTest.Single(x => x.RegionalRequestID == i)); this.MockRegionalRequestService = mockRegionalRequestService.Object; this.MockAdminUnitService = mockAdminUnitService.Object; this.MockFdpService = mockFDPService.Object; this.MockProgramService = mockProgramService.Object; this.MockCommodityService = mockCommodityService.Object; this.MockRegionalRequestDetailService = mockRegionalRequestDetailService.Object; }
public ContactPersonController(IContactService contactService, IFDPService fdpService) { _contactService = contactService; _fdpService = fdpService; }
public ContactController(IContactService contactService, IFDPService fdpService, IUserProfileService userProfileService) : base(userProfileService) { _contactService = contactService; _fdpService = fdpService; }
public FDPController(IAdminUnitService adminUnitService, IFDPService fdpService) { _adminUnitService = adminUnitService; _fdpService = fdpService; }