public BillingProxyTest() { _configuration = SetupConfigurations.GetApplicationConfiguration(Directory.GetCurrentDirectory()); _rootConfiguration = new Mock <IOptionsSnapshot <RootConfigurations> >(); _rootConfiguration.Setup(m => m.Value).Returns(_configuration); _BillingProxy = new BillingProxy(_rootConfiguration.Object); model = new NewBillModel { AgencyJebayaCodeForSaddad = "041001000000002000", AmountDue = 100, DueDate = DateTime.Now, ExpDate = DateTime.Now.AddDays(15), RevList = new List <RevenueEntryInfoType>() { new RevenueEntryInfoType { Amt = 100, BenAgencyId = "067000000000000000", GFSCode = "1421901", } }, sadadInvoiceNumber = "10030161467", SupplierNameAr = "142154293000206", SupplierNameEn = "142154293000206", billRefIdForBillingForSaddad = "SubScriptions", ClientKey = "000000" }; }
public RootConfigurations DefaultRootConfigurationsForTender() { OldFlow oldFlow = new OldFlow() { isApplied = true, EndDate = "2020-04-24" }; NewAwarding newAwarding = new NewAwarding() { ReleaseDate = "2020-11-24" }; UnitAgencyCodeConfiguration unitAgencyCodeConfiguration = new UnitAgencyCodeConfiguration() { UnitAgencyCode = "022001000000" }; RootConfigurations rootConfigurations = new RootConfigurations() { OldFlow = oldFlow, NewAwarding = newAwarding, UnitAgencyCodeConfiguration = unitAgencyCodeConfiguration }; return(rootConfigurations); }
public AgencyBudgetProxyTest() { _configuration = SetupConfigurations.GetApplicationConfiguration(Directory.GetCurrentDirectory()); _rootConfiguration = new Mock <IOptionsSnapshot <RootConfigurations> >(); _rootConfiguration.Setup(m => m.Value).Returns(_configuration); _agencyBudgetProxy = new AgencyBudgetProxy(_rootConfiguration.Object); }
public RootConfigurations DefaultRootConfigurationsForBilling() { BillingConfiguration billingConfiguration = new BillingConfiguration() { ClientKey = "111111", GFSCODEForConditionalBooklet = "1421901", GFSCODEForInvitations = "1421901", GFSCODEForAddedValue = "1421901" }; EsbSettingsConfiguration esbSettingsConfiguration = new EsbSettingsConfiguration() { IsProduction = false, BillRefIdForBillingForSaddad = "006000000000000000", BillAgencyCodeForSaddad = "006000000000000000", BillAgencyCodeentifierForSaddad = "006000000000000000", BenAgencyCodeForInvitations = "006000000000000000", BenAgencyCodeForConditionsBooklet = "006000000000000000", ClientCertificateFindValue = "EtimadIDMProd", }; var options = new RootConfigurations() { EsbSettingsConfiguration = esbSettingsConfiguration, BillingConfiguration = billingConfiguration }; return(options); }
public SMEASizeInquiryProxyTest() { _configuration = SetupConfigurations.GetApplicationConfiguration(Directory.GetCurrentDirectory()); _rootConfiguration = new Mock <IOptionsSnapshot <RootConfigurations> >(); _rootConfiguration.Setup(m => m.Value).Returns(_configuration); _sMEASizeInquiryProxy = new SMEASizeInquiryProxy(_rootConfiguration.Object); }
public QuantityTemplatesProxyTest() { _configuration = SetupConfigurations.GetApplicationConfiguration(Directory.GetCurrentDirectory()); _rootConfiguration = new Mock <IOptionsSnapshot <RootConfigurations> >(); _rootConfiguration.Setup(m => m.Value).Returns(_configuration); _QuantityTemplatesProxy = new QuantityTemplatesProxy(_rootConfiguration.Object); }
public VerificationService(IGenericCommandRepository genericCommandRepository, IVerificationQueries verificationQueries, INotificationAppService notificationAppService, IHttpContextAccessor httpContextAccessor, ITenderDomainService tenderDomainService, IOptionsSnapshot <RootConfigurations> optionsSnapshot) { _verificationQueries = verificationQueries; _genericCommandRepository = genericCommandRepository; _httpContextAccessor = httpContextAccessor; _tenderDomainService = tenderDomainService; _notificationAppService = notificationAppService; _configuration = optionsSnapshot.Value; }
public QualificationDomainService(IAppDbContext context, IQualificationQueries tenderQueries, IHttpContextAccessor httpContextAccessor, ICommunicationQueries communicationQueries, IOptionsSnapshot <RootConfigurations> rootConfiguration, IIDMQueries iDMQueries) { this.context = context; _tenderQueries = tenderQueries; _httpContextAccessor = httpContextAccessor; _communicationQueries = communicationQueries; _rootConfiguration = rootConfiguration.Value; _iDMQueries = iDMQueries; }
public ProxyBase(IOptionsSnapshot <RootConfigurations> rootConfiguration) { _rootConfiguration = rootConfiguration.Value; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) => { if (!_rootConfiguration.EsbSettingsConfiguration.IsProduction) { return(true); } return(errors == SslPolicyErrors.None); }; }
public EnquiryAppService(IIDMAppService iDMAppService, INotificationAppService notificationAppService, IMapper mapper, IEnquiryQueries enquiryQueries, IEnquiryCommands enquiryCommands, ITenderAppService tenderAppService, IEnquiryDomainService enquiryDomain, IHttpContextAccessor httpContextAccessor, IOptionsSnapshot <RootConfigurations> rootConfiguration) { _iDMAppService = iDMAppService; _enquiryCommands = enquiryCommands; _enquiryQueries = enquiryQueries; _mapper = mapper; _notificationAppService = notificationAppService; _tenderAppService = tenderAppService; _enquiryDomain = enquiryDomain; _rootConfiguration = rootConfiguration.Value; _httpContextAccessor = httpContextAccessor; }
public FileNetProxyTest() { _configuration = SetupConfigurations.GetApplicationConfiguration(Directory.GetCurrentDirectory()); _rootConfiguration = new Mock <IOptionsSnapshot <RootConfigurations> >(); _rootConfiguration.Setup(m => m.Value).Returns(_configuration); _certificateEncryption = new CertificateEncryption(_rootConfiguration.Object); _contentEncryptionManger = new ContentEncryptionManger(_certificateEncryption, _rootConfiguration.Object); _mockLogger = new Mock <ILogger <FileNetScan> >(); _fileNetScan = new FileNetScan(_mockLogger.Object, _rootConfiguration.Object); _fileNetProxy = new FileNetProxy(_contentEncryptionManger, _rootConfiguration.Object); _fileNetService = new FileNetService(_fileNetScan, _fileNetProxy); }
public NotificationJobAppService(IGenericCommandRepository genericrepository, IIDMProxy iDMProxy, IMemoryCache cache, INotificationQueries iNotificationQuerie, IINotificationCommands notifayCommands, ILogger <NotificationAppService> logger, IMapper mapper, IOptionsSnapshot <RootConfigurations> optionsSnapShot) { _idmProxy = iDMProxy; _cache = cache; _iNotificationQuerie = iNotificationQuerie; _notifayCommands = notifayCommands; _logger = logger; _mapper = mapper; _configuration = optionsSnapShot.Value; _genericCommandRepository = genericrepository; }
public RootConfigurations DefaultRootConfigurationsForQualification() { QualificationSettingConfiguration qualificationSetting = new QualificationSettingConfiguration() { DefaultValue = "0.01" }; RootConfigurations rootConfigurations = new RootConfigurations() { QualificationSettingConfiguration = qualificationSetting }; return(rootConfigurations); }
public RootConfigurations DefaultRootConfigurationsFor() { OldFlow oldFlow = new OldFlow() { isApplied = true, EndDate = "2020-04-24" }; RootConfigurations rootConfigurations = new RootConfigurations() { OldFlow = oldFlow }; return(rootConfigurations); }
public NotificationAppService(INotificationProxy notificationProxy, IIDMProxy iDMProxy, IMemoryCache cache, INotificationQueries iNotificationQuerie, IINotificationCommands notifayCommands, IGenericCommandRepository genericrepository, ILogger <NotificationAppService> logger, IMapper mapper, IBranchServiceQueries BrancheQuery, ICommitteeQueries CommitteeQuery, IHttpContextAccessor httpContextAccessor, IOptionsSnapshot <RootConfigurations> optionsSnapShot) { _notificationProxy = notificationProxy; _idmProxy = iDMProxy; _cache = cache; _genericrepository = genericrepository; _iNotificationQuerie = iNotificationQuerie; _notifayCommands = notifayCommands; _logger = logger; _mapper = mapper; _BranchQuery = BrancheQuery; _CommitteeQuery = CommitteeQuery; _configuration = optionsSnapShot.Value; _httpContextAccessor = httpContextAccessor; }
public static Mock <IOptionsSnapshot <RootConfigurations> > GetApplicationConfiguration(string outputPath) { var rootConfigurations = new RootConfigurations(); var iConfig = GetIConfigurationRoot(outputPath); iConfig .GetSection("RootConfigurations") .Bind(rootConfigurations); Mock <IOptionsSnapshot <RootConfigurations> > rootConfigurationsMock = new Mock <IOptionsSnapshot <RootConfigurations> >(); rootConfigurationsMock.Setup(m => m.Value).Returns(rootConfigurations); return(rootConfigurationsMock); }
public async Task ShouldReturnExceptionIfSRMFrameworkAgreementManageModelIsNullAsync() { //Arrange SRMFrameworkAgreementManageFunctionIDConfiguration fun = new SRMFrameworkAgreementManageFunctionIDConfiguration() { SRMFrameworkAgreementMngFunctionID = "15060000" }; SRMFrameworkAgreementManageServiceIDConfiguration serv = new SRMFrameworkAgreementManageServiceIDConfiguration() { SRMFrameworkAgreementMngServiceID = "SRMFrameworkAgreementMng" }; EsbSettingsConfiguration esbSettingsConfiguration = new EsbSettingsConfiguration() { IsProduction = false, ClientCertificateFindValue = "EtimadIDMProd" }; ServicesConfiguration servicesConfiguration = new ServicesConfiguration() { SRMFrameworkAgreementManageService = "https://10.14.8.25:7923/SRMFrameworkAgreementManage11" }; IsSRMFrameworkAgreementWorkConfiguration obj = new IsSRMFrameworkAgreementWorkConfiguration() { isSRMFrameworkAgreementWork = true }; var options = new RootConfigurations() { SRMFrameworkAgreementManageFunctionIDConfiguration = fun, SRMFrameworkAgreementManageServiceIDConfiguration = serv, EsbSettingsConfiguration = esbSettingsConfiguration, ServicesConfiguration = servicesConfiguration, isSRMFrameworkAgreementWorkConfiguration = obj }; var mock = new Mock <IOptionsSnapshot <RootConfigurations> >(); mock.Setup(m => m.Value).Returns(options); _SRMFrameworkAgreementManageProxy = new SRMFrameworkAgreementManageProxy(mock.Object); SRMFrameworkAgreementManageModel requestData = null; //Act var result = await _SRMFrameworkAgreementManageProxy.SRMFrameworkAgreementManage(requestData); //Assert Assert.False(result); }
public RootConfigurations DefaultRootConfigurationsForCachingInformation() { ChachingConfiguration ChachingConfiguration = new ChachingConfiguration() { CachingDays = "1", CachingHours = "1", CachingMinutes = "1", CachingSeconds = "31104000", }; MonafasatURLConfiguration monafasatURLConfiguration = new MonafasatURLConfiguration() { MonafasatURL = "https://monafasat.etimad.sa/" }; InvitationEmailConfiguration invitationEmailConfiguration = new InvitationEmailConfiguration() { SendInvitationByEmail = new SendInvitationByEmail2Configuration() { subject = "subject", body = "body" }, SendInvitationBySms = "sms" }; InvitationSolidarityEmailConfiguration invitationSolidarityEmailConfiguration = new InvitationSolidarityEmailConfiguration() { SendInvitationByEmail = new SendInvitationByEmailConfiguration() { subject = "subject", body = "body" }, SendInvitationBySms = "sms" }; RootConfigurations rootConfigurations = new RootConfigurations() { ChachingConfiguration = ChachingConfiguration, MonafasatURLConfiguration = monafasatURLConfiguration, InvitationEmailConfiguration = invitationEmailConfiguration, InvitationSolidarityEmailConfiguration = invitationSolidarityEmailConfiguration }; return(rootConfigurations); }
public BillAppService(IOptionsSnapshot <RootConfigurations> rootConfiguration, IBillingProxy billingProxy, INotificationAppService notificationAppService, IBillCommand billCommands, IBillQueries billQueries, IIDMAppService idmAppService, ILogger <BillAppService> logger, IBillArchiveCommand billArchiveCommands) { _billProxy = billingProxy; _billCommands = billCommands; _billArchiveCommands = billArchiveCommands; _billQueries = billQueries; _notificationAppService = notificationAppService; _idmAppService = idmAppService; RootConfigurations _rootConfiguration = rootConfiguration.Value; _billRefIdForBillingForSaddad = _rootConfiguration.EsbSettingsConfiguration.BillRefIdForBillingForSaddad; _billAgencyCodeForSaddad = _rootConfiguration.EsbSettingsConfiguration.BillAgencyCodeForSaddad; _billAgencyJebayaIdentifierForSaddad = _rootConfiguration.EsbSettingsConfiguration.BillAgencyCodeentifierForSaddad; _clientKey = _rootConfiguration.BillingConfiguration.ClientKey; _benAgencyCodeForInvitations = _rootConfiguration.EsbSettingsConfiguration.BenAgencyCodeForInvitations; _benAgencyCodeForConditionsBooklet = _rootConfiguration.EsbSettingsConfiguration.BenAgencyCodeForConditionsBooklet; _gFSCODEForConditionalBooklet = _rootConfiguration.BillingConfiguration.GFSCODEForConditionalBooklet; _gFSCODEForInvitations = _rootConfiguration.BillingConfiguration.GFSCODEForInvitations; _gFSCODEForAddedValue = _rootConfiguration.BillingConfiguration.GFSCODEForAddedValue; _logger = logger; }
public RootConfigurations DefaultRootConfigurationsForOfferTimesConfiguration() { OfferTimesConfiguration offerTimesConfiguration = new OfferTimesConfiguration() { StartOfferTime = 7, EndOfferTime = 20, StartOfferVacationTime = 9, EndOfferVacationTime = 14 }; PlaintSettingConfiguration plaintSettingConfiguration = new PlaintSettingConfiguration() { PlaintReviewingPeriod = "15", PlaintPeriod = "3" }; var options = new RootConfigurations() { OfferTimesConfiguration = offerTimesConfiguration, PlaintSettingConfiguration = plaintSettingConfiguration }; return(options); }
public ContractAppService(IContractQueries contractQueries, IOptionsSnapshot <RootConfigurations> rootConfiguration) { _contractQueries = contractQueries; _rootConfiguration = rootConfiguration.Value; }
public BranchServiceQueries(IAppDbContext context, IOptionsSnapshot <RootConfigurations> rootConfiguration) { _context = context; _rootConfiguration = rootConfiguration.Value; }
public async Task ShouldReturnTrueFromSRMFrameworkAgreementManageService() { //Arrange SRMFrameworkAgreementManageFunctionIDConfiguration fun = new SRMFrameworkAgreementManageFunctionIDConfiguration() { SRMFrameworkAgreementMngFunctionID = "15060000" }; SRMFrameworkAgreementManageServiceIDConfiguration serv = new SRMFrameworkAgreementManageServiceIDConfiguration() { SRMFrameworkAgreementMngServiceID = "SRMFrameworkAgreementMng" }; EsbSettingsConfiguration esbSettingsConfiguration = new EsbSettingsConfiguration() { IsProduction = false, ClientCertificateFindValue = "EtimadIDMProd" }; ServicesConfiguration servicesConfiguration = new ServicesConfiguration() { SRMFrameworkAgreementManageService = "https://10.14.8.25:7923/SRMFrameworkAgreementManage11" }; IsSRMFrameworkAgreementWorkConfiguration obj = new IsSRMFrameworkAgreementWorkConfiguration() { isSRMFrameworkAgreementWork = true }; var options = new RootConfigurations() { SRMFrameworkAgreementManageFunctionIDConfiguration = fun, SRMFrameworkAgreementManageServiceIDConfiguration = serv, EsbSettingsConfiguration = esbSettingsConfiguration, ServicesConfiguration = servicesConfiguration, isSRMFrameworkAgreementWorkConfiguration = obj }; var mock = new Mock <IOptionsSnapshot <RootConfigurations> >(); mock.Setup(m => m.Value).Returns(options); _SRMFrameworkAgreementManageProxy = new SRMFrameworkAgreementManageProxy(mock.Object); List <VendorList> vendorLst = new List <VendorList>(); List <ProductList> productLists = new List <ProductList>(); List <string> agencyList = new List <string>(); var requestData = new SRMFrameworkAgreementManageModel(); requestData.ReferenceNumber = "4000012345"; requestData.ContractName = " Framework for Stationary purchase"; requestData.ContractType = SRMContractType.Open; requestData.AwardDt = DateTime.Now; requestData.CreatedBy = "014014000000"; requestData.ValidityInfo = new ValidityInfo() { NumOfDays = 15, NumOfMonths = 0, NumOfYears = 1 }; requestData.ValidFrom = DateTime.Now; requestData.Currency = "SAR"; requestData.TotalAmt = 1000; requestData.Note = "note"; var deliveryDurationInfo = new DeliveryDurationInfo() { NumOfDays = 1, NumOfMonths = 1, NumOfYears = 1 }; productLists.Add(new ProductList() { ProductId = "1", ProductName = "chair", UnitPrice = 1, Quantity = 1, UnitOfMeasure = "Each", VATAmt = 123, DiscountPercen = 5, DeliveryDurationInfo = deliveryDurationInfo, Desc = "desc" }); vendorLst.Add(new VendorList() { VendorId = "2050016410", AwardedAmt = 60000, PurchaseCurrency = "SAR", ProductList = productLists }); agencyList.Add("041001000000"); requestData.AgencyList = agencyList; requestData.VendorsList = vendorLst; //Act var result = await _SRMFrameworkAgreementManageProxy.SRMFrameworkAgreementManage(requestData); //Assert Assert.True(result); }
public LocalContentConfigurationSettings(IAppDbContext context, IMemoryCache cache, IOptionsSnapshot <RootConfigurations> optionsSnapShot) { _context = context; _cache = cache; _configuration = optionsSnapShot.Value; }
public FileNetScan(ILogger <FileNetScan> logger, IOptionsSnapshot <RootConfigurations> rootConfiguration) { _logger = logger; _rootConfiguration = rootConfiguration.Value; }
public LookupServiceQueries(IAppDbContext context, IHttpContextAccessor httpContextAccessor, IOptionsSnapshot <RootConfigurations> rootConfiguration) { _context = context; _httpContextAccessor = httpContextAccessor; _rootConfiguration = rootConfiguration.Value; }
public BaseController(IOptionsSnapshot <RootConfigurations> rootConfiguration) { _rootConfiguration = rootConfiguration.Value; }