예제 #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);
        }
예제 #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);
        }
예제 #3
0
 public List <Client> GetAll() => clientDAO.GetAll();