示例#1
0
        public void IsUnder18_Should_Answer_No()
        {
            var expect = false;
            var result = PodiumUtility.IsUnder18(DateTime.Parse("2000-05-05"));

            Assert.AreEqual(expect, result);
        }
示例#2
0
        public IEnumerable <Product> GetAvailableProduct(ProductSearchTerms searchTerms)
        {
            User    user = this._users.GetUser(searchTerms.UserID);
            decimal ltv  = PodiumUtility.CalculateLTV(searchTerms.PropertyValue, searchTerms.DepositeAmount);

            bool IsUnder18 = PodiumUtility.IsUnder18(user.DOB);

            if (IsUnder18)
            {
                return(null);
            }

            IProductFactory factory = new ProductFactory(_products, ltv);

            return(factory.GetProducts());
        }