public void IsUnder18_Should_Answer_No() { var expect = false; var result = PodiumUtility.IsUnder18(DateTime.Parse("2000-05-05")); Assert.AreEqual(expect, result); }
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()); }