Exemple #1
0
        public QualificationApiControllertest()
        {
            var serviceProvider = services.BuildServiceProvider();

            tenderService                = serviceProvider.GetService <ITenderAppService>();
            qualificationAppService      = serviceProvider.GetService <IQualificationAppService>();
            iDMAppService                = serviceProvider.GetService <IIDMAppService>();
            lookupAppService             = serviceProvider.GetService <ILookUpService>();
            supplierqualificationService = serviceProvider.GetService <ISupplierQualificationDocumentAppService>();
            verificationService          = serviceProvider.GetService <IVerificationService>();

            //Configure mapping just for this test
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <PreQualificationBasicDetailsModel, PreQualificationBasicDetailsModel>();
                cfg.CreateMap <MOF.Etimad.Monafasat.Core.Entities.Tender, PreQualificationSavingModel>();
                cfg.ValidateInlineMaps = false;
            });

            mapper = config.CreateMapper();

            _mockRootConfiguration = MockHelper.CreateIOptionSnapshotMock(new MOF.Etimad.Monafasat.SharedKernal.RootConfigurations());
            //verificationService = new Mock<IVerificationService>().Object;
            authorizationService = new Mock <IAuthorizationService>().Object;
            supplierService      = new Mock <ISupplierService>().Object;
            offerAppService      = new Mock <IOfferAppService>().Object;
            supplierQualificationDocumentDomainService = new Mock <ISupplierQualificationDocumentDomainService>().Object;
            memoryCache      = new Mock <IMemoryCache>().Object;
            branchAppService = new Mock <IBranchAppService>().Object;

            _qualificationController = new QualificationController(supplierqualificationService, qualificationAppService, mapper, verificationService,
                                                                   iDMAppService, authorizationService, supplierService, offerAppService, lookupAppService, tenderService, supplierQualificationDocumentDomainService, _mockRootConfiguration);

            _lookupController = new LookupController(lookupAppService, mapper, iDMAppService, branchAppService, memoryCache, _mockRootConfiguration);
        }
 public QualificationServiceJob(IQualificationServiceQueryJob qualificationServiceQuery, ISupplierQualificationDocumentAppService supplierQualificationDocumentsAppService)
 {
     _QualificationServiceQuery = qualificationServiceQuery;
     _SupplierQualificationDocumentsAppService = supplierQualificationDocumentsAppService;
 }