public void KiemTraTinhTrangBan_MaBanKhongCo() { Ban b0 = new Ban(0, 0); Ban b1 = new Ban(111, 10, true); Ban b2 = new Ban(112, 15, false); Ban b3 = new Ban(113, 16); DSBan dsB = new DSBan(); dsB.ThemBan(b0); dsB.ThemBan(b1); dsB.ThemBan(b2); dsB.ThemBan(b3); dsB.ThemBan(4); dsB.SapXep(); bool excepted = false; bool actual = dsB.KiemTraTinhTrangBan(112); Assert.AreEqual(excepted, actual); }
public void ThemBan_MaBanChenCuoi() { Ban b0 = new Ban(0, 0); Ban b1 = new Ban(111, 10); Ban b2 = new Ban(112, 15); Ban b3 = new Ban(113, 16); DSBan dsB = new DSBan(); dsB.ThemBan(b0); dsB.ThemBan(b1); dsB.ThemBan(b2); dsB.ThemBan(b3); dsB.ThemBan(4); dsB.SapXep(); Ban excepted = new Ban(114, 4); Ban actual = dsB.DsBan[4]; Assert.AreEqual(excepted.MaBan, actual.MaBan); }
private void btnThemBan_Click(object sender, EventArgs e) { dsBan.ThemBan(int.Parse(txtSucChua.Text)); dsBan.SapXep(); RefreshData(); }