Пример #1
0
        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);
        }
Пример #2
0
        public override void createTestFixture()
        {
            base.createTestFixture();

            var xmlStream = DateTimeExtension.GetResource("BodyArchitect.UnitTests.V2.BAPointsTests.BAPoints.xml");
            var manager1  = new PaymentsManager();

            manager = manager1.Load(xmlStream);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
 public Przelewy24Handler(PaymentsHolder paymentsManager) : base(paymentsManager)
 {
 }
Пример #6
0
 public TestablePayPalHandler(PaymentsHolder manager, string receiverEmail)
     : base(manager)
 {
     this.receiverEmail = receiverEmail;
 }
Пример #7
0
 public AmazonHandler(PaymentsHolder paymentsManager) : base(paymentsManager)
 {
 }
Пример #8
0
 public TransferujHandler(PaymentsHolder paymentsManager) : base(paymentsManager)
 {
 }
 public TestableTranferujHandler(PaymentsHolder manager)
     : base(manager)
 {
     RequestIp = "195.149.229.109";
 }
Пример #10
0
 public PayPalHandler(PaymentsHolder paymentsManager) : base(paymentsManager)
 {
 }
Пример #11
0
 public PaymentsHandlerBase(PaymentsHolder paymentsManager)
 {
     this.paymentsManager = paymentsManager;
     UseSandbox           = ConfigurationManager.AppSettings["UsePayPalSandBox"] == "true";
 }
Пример #12
0
        public TestablePrzelewy24Handler(PaymentsHolder manager)
            : base(manager)
        {
            Response = @"RESULT
TRUE";
        }