Ejemplo n.º 1
0
        public void TestIfGetAllReturnsCorrectValues()
        {
            var clients = clientBusiness.GetAll();

            Assert.AreEqual(3, clients.Count, "Doesn't return correct number of clients!");
            Assert.AreEqual("Alan", clients[0].FirstName, "Client 1 isn't equal to Alan");
            Assert.AreEqual("Bob", clients[1].FirstName, "Client 2 isn't equal to Bob");
            Assert.AreEqual("Jefrey", clients[2].FirstName, "Client 3 isn't equal to Jefrey");
        }
Ejemplo n.º 2
0
        private void ListAll()
        {
            Console.WriteLine(new string('-', 40));
            Console.WriteLine(new string(' ', 16) + "Clients" + new string(' ', 16));
            Console.WriteLine(new string('-', 40));
            var clients = clientBusiness.GetAll();

            foreach (var client in clients)
            {
                Console.WriteLine("{0} || {1} {2} ", client.Id, client.FirstName, client.LastName);
            }
        }
Ejemplo n.º 3
0
        // GET: clients
        public ActionResult Index()
        {
            var clients = clientBusiness.GetAll();

            return(View(clients));
        }