public ActionResult New(string sheba, string cart, string number, string bank) { ViewBag.Title = "ثبت حساب/کارت بانکی جدید"; BankAccount tk = new BankAccount(); try { tk.CustomerId = long.Parse(Session["customer_id"].ToString()); tk.BankId = int.Parse(bank); tk.Status = 1; tk.Sheba = sheba; tk.CardNumber = cart; tk.AccountNumber = number; tk.Add(); return(RedirectToAction("Index", "BankAccount")); } catch (Exception ex) { ErrorLog log = new ErrorLog(); log.Description = ex.Message; if (ex.InnerException != null) { log.Description += ";" + ex.Message; } log.ErrorDate = DateTime.Now; log.Add(); } return(View(tk)); }
public void AddTest() { var myBankAccount = new BankAccount(BookShop.StartingBalance); myBankAccount.Add(300); myBankAccount.Balance.Should().Be(100300); }
public void Test_Agrego_Fondos() { //Agrego fondos account.Add(600); //Controlo que el balance es el correcto Assert.AreEqual(1600, account.Balance); }
public void Adding_Negative_Funds_Updates_Balance() { // Arrange var account = new BankAccount(1000); // Act + Assert Assert.Throws <ArgumentOutOfRangeException>(() => account.Add(-100)); }
public void Adding_Funds_Updates_Balance() { // Arrange var account = new BankAccount(1000); // Act account.Add(100); // Assert Assert.Equal(1100, account.Balance); }
private World() { Debug.Log("World created"); // Create world tilemap TileMap = MapGenerator.GetWorldMap(); // Initialize account account = new BankAccount(); account.Add(100000); // Create characters Characters = new List <NPC> { new NPC("Amanda", "wife", new Vector2(11, 10)), new NPC("Zoe", "child", new Vector2(12, 10)) }; // Initialize floor plan (walls, furniture) }