public void SetMarketValue_MultiplyPriceAndQuantity() { FundService fs = new FundService(); var value = fs.SetMarketValue(10, 2); Assert.AreEqual(20, value); }
public void SetStockWeight_DivideMVAndTotalSumOfAllMV() { FundService fs = new FundService(); var mv = fs.SetMarketValue(10, 1); var sw = fs.SetStockWeight(mv, 10); Assert.AreEqual(1, sw); }
public void SetTransactionCost_MultiplyMVandBondValue() { FundService fs = new FundService(); var mv = fs.SetMarketValue(10, 2); var value = fs.SetTransactionCost(mv, Type.Bond); Assert.AreEqual(0.4, value); }
public void SetTotalMarketValue_IfListIsEmptyReturnPriceMultiplyByQuantity() { var funds = new BindingList <Fund>(); Operations operations = new Operations(); FundService fundService = new FundService(); var value = operations.SetTotalMarketValue(funds, fundService.SetMarketValue(10, 1)); Assert.AreEqual(10, value); }