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 void GetPointsForOffert()
        {
            var             xmlStream = DateTimeExtension.GetResource("BodyArchitect.UnitTests.V2.BAPointsTests.BAPoints.xml");
            PaymentsManager manager1  = new PaymentsManager();
            var             manager   = manager1.Load(xmlStream);

            Assert.AreEqual(30, manager.GetPointsForOffert("BAPoints_30"));
            Assert.AreEqual(0, manager.GetPointsForOffert("NotExistingOffert"));
        }
        public void GetPoints()
        {
            var             xmlStream = DateTimeExtension.GetResource("BodyArchitect.UnitTests.V2.BAPointsTests.BAPoints.xml");
            PaymentsManager manager1  = new PaymentsManager();
            var             manager   = manager1.Load(xmlStream);

            Assert.AreEqual(1, manager.GetPoints(AccountType.PremiumUser).Points);
            Assert.IsNull(manager.GetPoints(AccountType.PremiumUser).PromotionPoints);
            Assert.IsNull(manager.GetPoints(AccountType.PremiumUser).PromotionStartDate);

            Assert.AreEqual(2, manager.GetPoints(AccountType.Instructor).Points);
            Assert.IsNull(manager.GetPoints(AccountType.Instructor).PromotionPoints);
            Assert.IsNull(manager.GetPoints(AccountType.Instructor).PromotionStartDate);

            Assert.AreEqual(0, manager.GetPoints(AccountType.User).Points);
            Assert.IsNull(manager.GetPoints(AccountType.User).PromotionPoints);
            Assert.IsNull(manager.GetPoints(AccountType.User).PromotionStartDate);

            Assert.AreEqual(0, manager.GetPoints(AccountType.Administrator).Points);
            Assert.IsNull(manager.GetPoints(AccountType.Administrator).PromotionPoints);
            Assert.IsNull(manager.GetPoints(AccountType.Administrator).PromotionStartDate);
        }