public void Get_BalanceMin_At_Date() { CompulsorySavingsProduct product = new CompulsorySavingsProduct(); CompulsorySavings CompulsorySavings = new CompulsorySavings(ApplicationSettings.GetInstance(""), ChartOfAccounts.GetInstance(new User()), new User(), 1000, new DateTime(2009, 01, 01), product, null); CompulsorySavings.Withdraw(100, new DateTime(2009, 02, 02), "retrait", new User(), false); CompulsorySavings.Deposit(230, new DateTime(2009, 02, 02), "depot", new User(), false, false, OSavingsMethods.Cash); Assert.AreEqual(CompulsorySavings.GetBalanceMin(new DateTime(2009, 01, 01)), 1000); Assert.AreEqual(CompulsorySavings.GetBalanceMin(new DateTime(2009, 02, 01)), 1000); Assert.AreEqual(CompulsorySavings.GetBalanceMin(new DateTime(2009, 02, 02)), 900); }
public void Get_Balance_At_Date() { CompulsorySavingsProduct product = new CompulsorySavingsProduct(); CompulsorySavings CompulsorySavings = new CompulsorySavings(ApplicationSettings.GetInstance(""), ChartOfAccounts.GetInstance(new User()), new User(), 1000, new DateTime(2009, 01, 01), product, null); CompulsorySavings.Deposit(100, new DateTime(2009, 02, 01), "depot", new User(), false, false, OSavingsMethods.Cash); CompulsorySavings.Withdraw(230, new DateTime(2009, 02, 03), "retrait", new User(), false); Assert.AreEqual(CompulsorySavings.GetBalance(new DateTime(2009, 01, 31)), 1000); Assert.AreEqual(CompulsorySavings.GetBalance(new DateTime(2009, 02, 01)), 1100); Assert.AreEqual(CompulsorySavings.GetBalance(new DateTime(2009, 02, 02)), 1100); Assert.AreEqual(CompulsorySavings.GetBalance(new DateTime(2009, 02, 03)), 870); }