public void Add50_Milion_VNDRevenue() { MIB.DataType tmpData = new MIB.DataType(); tmpData.type = "revenue"; if (DateTime.Now.Month >= 10) tmpData.date.month = DateTime.Now.Month.ToString(); else tmpData.date.month = "0" + DateTime.Now.Month.ToString(); tmpData.time = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); tmpData.money = "50"; tmpData.unit = "milion thousand VND"; tmpData.describe = "bán gỗ hương"; TestWallet.Add(tmpData); Assert.AreEqual(tmpData, TestWallet.data[TestWallet.data.Count() - 1]); }
public void Add30_Milion_VND_Expenditure() { MIB.DataType tmpData = new MIB.DataType(); tmpData.type = "expenditure"; if (DateTime.Now.Month >= 10) tmpData.date.month = DateTime.Now.Month.ToString(); else tmpData.date.month = "0" + DateTime.Now.Month.ToString(); tmpData.time = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); tmpData.money = "30"; tmpData.unit = "milion thousand VND"; tmpData.describe = "mua xe ex"; TestWallet.Add(tmpData); Assert.AreEqual(tmpData, TestWallet.data[TestWallet.data.Count() - 1]); }
public void Add4_Hundred_Thousand_VNDRevenue() { MIB.DataType tmpData = new MIB.DataType(); tmpData.type = "revenue"; if (DateTime.Now.Month >= 10) tmpData.date.month = DateTime.Now.Month.ToString(); else tmpData.date.month = "0" + DateTime.Now.Month.ToString(); tmpData.time = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); tmpData.money = "4"; tmpData.unit = "hundred thousand VND"; tmpData.describe = "ban chim"; TestWallet.Add(tmpData); Assert.AreEqual(tmpData, TestWallet.data[TestWallet.data.Count() - 1]); }
public void Add9000VNDExpenditure() { MIB.DataType tmpData = new MIB.DataType(); tmpData.type = "expenditure"; if (DateTime.Now.Month >= 10) tmpData.date.month = DateTime.Now.Month.ToString(); else tmpData.date.month = "0" + DateTime.Now.Month.ToString(); tmpData.time = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); tmpData.money = "9000"; tmpData.unit = "VND"; tmpData.describe = "mua chim hoa\nqua"; TestWallet.Add(tmpData); Assert.AreEqual(tmpData, TestWallet.data[TestWallet.data.Count() - 1]); }