public void GetAllBulletinTest() { List <Bulletin> bulletinlist = GetBulletin(); Account loginUser = new Account(); loginUser.Dept = bulletinlist[0].Dept; loginUser.Auths = new List <Auth>(); List <Bulletin> bulletins = _BulletinBll.GetAllBulletin(loginUser); Assert.AreEqual(4, bulletins.Count); Assert.AreEqual("dept121", bulletins[0].Dept.Name); Assert.AreEqual("dept1", bulletins[1].Dept.Name); Assert.AreEqual("dept12", bulletins[2].Dept.Name); Assert.AreEqual("dept1212", bulletins[3].Dept.Name); }
public void SearchBulletin(object sender, EventArgs e) { try { _View.BulletinList = _BulletinBll.GetAllBulletin(LoginUser); } catch { _View.BulletinList = new List <Bulletin>(); } }