public override void createTestFixture() { base.createTestFixture(); ObjectsConverter.Configure(); configureLogging(); clientInformation = new ClientInformation() { Version = Const.ServiceVersion }; clientInformation.ApplicationLanguage = "en"; clientInformation.PlatformVersion = "fgfdgdfg"; clientInformation.ApplicationVersion = "1.0.0.0"; var conf = new ConfigurationSourceBuilder(); conf.ConfigureCaching().ForCacheManagerNamed(SecurityManager.AuthenticationCacheName).StoreInMemory(); var configSource = new DictionaryConfigurationSource(); conf.UpdateConfigurationWithReplace(configSource); var xmlStream = DateTimeExtension.GetResource("BodyArchitect.UnitTests.V2.BAPointsTests.BAPoints.xml"); var paymentsManager = new PaymentsManager(); this.paymentsManager = paymentsManager.Load(xmlStream); InternalBodyArchitectService.PaymentsManager = this.paymentsManager; EnterpriseLibraryContainer.Current = EnterpriseLibraryContainer.CreateDefaultContainer(configSource); }
public override void createTestFixture() { base.createTestFixture(); var xmlStream = DateTimeExtension.GetResource("BodyArchitect.UnitTests.V2.BAPointsTests.BAPoints.xml"); var manager1 = new PaymentsManager(); manager = manager1.Load(xmlStream); }
public PaymentsHolder Load(IDictionary <AccountType, PaymentAccountType> accountTypes, IDictionary <string, int> itemsToBuy, int kara) { PaymentsHolder paymentsHolder = new PaymentsHolder(); paymentsHolder.AccountTypes = accountTypes; paymentsHolder.ItemsToBuy = itemsToBuy; paymentsHolder.Kara = kara; return(paymentsHolder); }
public PaymentsHolder Load(string xml) { PaymentsHolder payments = new PaymentsHolder(); var xmlElement = XElement.Parse(xml); var temp = (from c in xmlElement.Descendants("Accounts").Descendants("AccountType") select new PaymentAccountType() { AccountType = (AccountType)Enum.Parse(typeof(AccountType), c.Attribute("Name").Value), Points = int.Parse(c.Attribute("Points").Value), PromotionPoints = c.Attribute("PromotionPoints") != null ? int.Parse(c.Attribute("PromotionPoints").Value) : (int?)null, PromotionStartDate = c.Attribute("PromotionStartDate") != null ? DateTime.Parse(c.Attribute("PromotionStartDate").Value) : (DateTime?)null }); payments.Kara = int.Parse((from c in xmlElement.Descendants("Accounts") select c.Attribute("Kara").Value).Single()); payments.AccountTypes = temp.ToDictionary(x => x.AccountType); var temp1 = (from c in xmlElement.Descendants("Payments").Descendants("Payment") select new { OffertName = c.Attribute("Name"), Points = c.Attribute("Points") }); payments.ItemsToBuy = temp1.ToDictionary(x => x.OffertName.Value, b => int.Parse(b.Points.Value)); return(payments); }
public Przelewy24Handler(PaymentsHolder paymentsManager) : base(paymentsManager) { }
public TestablePayPalHandler(PaymentsHolder manager, string receiverEmail) : base(manager) { this.receiverEmail = receiverEmail; }
public AmazonHandler(PaymentsHolder paymentsManager) : base(paymentsManager) { }
public TransferujHandler(PaymentsHolder paymentsManager) : base(paymentsManager) { }
public TestableTranferujHandler(PaymentsHolder manager) : base(manager) { RequestIp = "195.149.229.109"; }
public PayPalHandler(PaymentsHolder paymentsManager) : base(paymentsManager) { }
public PaymentsHandlerBase(PaymentsHolder paymentsManager) { this.paymentsManager = paymentsManager; UseSandbox = ConfigurationManager.AppSettings["UsePayPalSandBox"] == "true"; }
public TestablePrzelewy24Handler(PaymentsHolder manager) : base(manager) { Response = @"RESULT TRUE"; }