public void TestDebiterCompte(int somme, int result) { AccountUser myUser = new AccountUser("FX", "Fabre", "chez moi"); myUser.CreateAccount("compte 1"); myUser.DebiterCompte(0); myUser.DebiterCompte(somme); Assert.AreEqual(result, myUser.SoldeCompte()); }
public void TestDisplayOperations() { AccountUser myUser = new AccountUser("FX", "Fabre", "chez moi"); myUser.CreateAccount("compte 1"); for (int i = 1; i <= 30; ++i) { myUser.DebiterCompte(i); } Console.WriteLine(myUser.DisplayOperations()); Assert.AreEqual(-15 * 31, myUser.SoldeCompte()); }