Exemplo n.º 1
0
        public void getClientsByValidAction()
        {
            //Arrange
            DataBaseContext         db = new DataBaseContext();
            IClientActionRepository clientActionRepo = new ClientActionRepository(db);
            string action = "Update";

            //Act
            List <Client> clients = clientActionRepo.GetClientsByAction(action);

            //Assert
            Assert.AreEqual(clients.Count, 3);
        }
Exemplo n.º 2
0
        public void ClientRepository_GetClientsByAction_InvalidAction()
        {
            //Arrange
            DataBaseContext         db = new DataBaseContext();
            IClientActionRepository clientActionRepo = new ClientActionRepository(db);
            string action = "NotAnAction";

            //Act
            List <Client> clients = clientActionRepo.GetClientsByAction(action);

            //Assert
            Assert.AreEqual(clients.Count, 0);
        }