public void moneyMultiplier()//level 1 multiplier is 1.1. { finance sys = new finance(); //sys.newprofit(profit); double profit = 2.0; Assert.AreEqual(sys.multiply1(profit), 2.2); }
public void makingMoney()//making money via buy and sell { finance sys = new finance(); double balance = 100; double oldprice = 10; double newprice = 20; int amount = 15; sys.newblance(balance, oldprice, newprice, amount); Assert.AreNotEqual(sys.newblance(balance, oldprice, newprice, amount), balance); }
private void I_edit(finance finance) { var viwer = new Finances.Viwer(); viwer.id = finance.id; viwer.name = finance.name; viwer.address = finance.address; viwer.phone = finance.phone; viwer.email = finance.email; }
public void loaddata(int id) { finance i = db.finances.Where(o => o.id == id).First(); txt_name.Text = i.name; txt_address.Text = i.address; txt_phone.Text = i.phone; txt_email.Text = i.email; this.id = id; }
public void multiplierTest()//There are three different money_multipliers from 1.1 to 1.3. { finance sys = new finance(); double profit = 100; sys.multiply1(profit); Assert.AreNotEqual(sys.multiply1(profit), sys.multiply2(profit)); Assert.AreEqual(120, sys.multiply2(profit)); Assert.AreEqual(profit, 100); Assert.AreEqual(130, sys.multiply3(profit)); }
private void btn_save_Click(object sender, EventArgs e) { if (txt_name.Text.Trim() == "") { CustomControls.Alert.show("name", "enter name", 1500); return; } if (txt_address.Text.Trim() == "") { CustomControls.Alert.show("address", "enter address", 1500); return; } if (txt_phone.Text.Trim() == "") { CustomControls.Alert.show("phone", "enter phone", 1500); return; } try { var i = new finance() { name = txt_name.Text, address = txt_address.Text, phone = txt_phone.Text, email = txt_email.Text, created_at = DateTime.Now, updated_at = DateTime.Now, }; db.finances.Add(i); db.SaveChanges(); add?.Invoke(i); this.Close(); } catch (Exception ex) { CustomControls.Alert.show("Data", "Error Data", 1500); } }
public void finance_construct() { finance sys = new finance(); Assert.IsNotNull(sys); }
private void Newitem_savedata(finance finance) { add(finance); }