public void CalculateLTV_Should_Calculate_LTV_Equal_90() { var expect = 90; var result = PodiumUtility.CalculateLTV(100000, 10000); Assert.AreEqual(expect, result); }
public void CalculateLTV_Should_Calculate_LTV_Below_60() { var data = PodiumUtility.CalculateLTV(100000, 40001); var expect = true; var result = (data < 90); 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()); }