public ResultModel Get() { try { var resultQuery = _bookBLL.GetAll(); return(new ResultModel(Code.OK, resultQuery, resultQuery.Count(), "thành công")); } catch (Exception) { return(new ResultModel(Code.SVERROR, "lỗi hệ thống")); } }
public void When_GetAll_Then_All() { //arrange var expectedResult = BookMock.GetList(); _bookRepo.Get().Returns(expectedResult); //act var actualResult = _bookBLL.GetAll(); //assert Assert.AreEqual(expectedResult.Count, actualResult.Books.Count); Assert.AreEqual(expectedResult.First().Title, actualResult.Books.First().Title); }
private void BindData() { bookDataGridView.DataSource = bookBll.GetAll(); }
private void InsertForm_FormClosed(object sender, FormClosedEventArgs e) { this.BindData(bookBll.GetAll()); }