Example #1
0
        public void GetAllEmptyClient()
        {
            var getAll         = new List <Client>();
            var clientExpected = new List <Client>();

            using (var db = new EntitesContext())
            {
                ClearTable.Clients(db);
                clientDAO = new DbClientDAO(db);
                getAll    = clientDAO.GetAll();
            }
            CollectionAssert.AreEqual(getAll, clientExpected);
        }
Example #2
0
        public void GetAllClient()
        {
            List <Client> getAll;
            var           clients = CreateListEntities.Clients();

            using (var db = new EntitesContext())
            {
                ClearTable.Clients(db);
                clientDAO = new DbClientDAO(db);

                foreach (var cl in clients)
                {
                    clientDAO.Add(cl);
                }

                getAll = clientDAO.GetAll();
            }

            CollectionAssert.AreEqual(getAll, clients);
        }
Example #3
0
 public List <Client> GetAll() => clientDAO.GetAll();