public void N_ReturnAllUsers_CanGetAllUsers_ReturnsTrue() { DBBroker broker = new DBBroker(); var userLogic = new UsersLogic(); List <User> expected = (List <User>)broker.reaturnAllUsers(); List <User> result = (List <User>)userLogic.reaturnAllUsers(); Assert.AreEqual(result.Count, expected.Count); }
public IList <User> reaturnAllUsers() { try { DBBroker broker = new DBBroker(); return(broker.reaturnAllUsers()); } catch (Exception) { throw; } }
private void refreshGrid() { bindUsers = new BindingList <User>(broker.reaturnAllUsers()); foreach (User user in bindUsers) { user.rolee = (Role)user.Role; } dgvUsers.DataSource = bindUsers; if (bindUsers.Count < 1) { btnDeleteUser.Enabled = false; btnUpdateUser.Enabled = false; } else { btnDeleteUser.Enabled = true; btnUpdateUser.Enabled = true; } }