//Them San Pham private void AddSP() { SanPham spToAdd = new SanPham(); spToAdd.TenSP = txtTenSP.Text; spToAdd.SoLuongTon = int.Parse(txtSoLuongTon.Text); spToAdd.DonGia = decimal.Parse(txtDonGia.Text); spToAdd.DonViTinh = txtDonViTinh.Text; spToAdd.MoTa = txtMoTa.Text; spToAdd.MaLoaiSP = int.Parse(txtMaLoaiSP.Text); spBUS.AddSPBUS(spToAdd); }
public void Test_AddSP_Suscess() { spBUS = new SanPhamBUS(); sp = new SanPham(); sp.TenSP = "spTestrrrrrrrrr"; sp.SoLuongTon = 1; sp.DonGia = 10; sp.DonViTinh = "kg"; sp.MoTa = ""; sp.HinhAnh = ""; sp.MaLoaiSP = 1; sp.MaNSX = 1; spBUS.AddSPBUS(sp); Assert.AreEqual(15, spBUS.LoadSPBUS().Count); }