Exemple #1
0
        public void ComoAdministradorQueroAListaDeTodosOsAtendentes()
        {
            //Arrange
            IRepositorioAtendente repositorioAtendente = new RepositorioAtendente(_sessaoNHibernate);

            //Act
            IList <Atendente> atendentes = repositorioAtendente.retornarTodos();

            //Assert
            Assert.IsTrue(atendentes.Count > 0);
        }
Exemple #2
0
        public void ComoAdministradorQueroSelecionarUmAtendentePorCPF()
        {
            //Arrange
            IRepositorioAtendente repositorioAtendente = new RepositorioAtendente(_sessaoNHibernate);

            //Act
            Atendente atendente = repositorioAtendente.retornarPorCPF("12334542312");

            //Assert

            Assert.IsTrue(atendente.Nome == "Fabio Margarito");
            Assert.IsTrue(atendente.CPF == "12334542312");
        }
Exemple #3
0
        public void ComoAdministradorQueroExcluirUmAntendente()
        {
            //Arrange
            IRepositorioAtendente repositorioAtendente = new RepositorioAtendente(_sessaoNHibernate);
            Atendente             atendente            = new Atendente("12334542312", "Fabio Margarito", DateTime.Now);
            Atendente             atendente2           = new Atendente("23232423232", "Flavio Margarito", DateTime.Now);

            //Act
            bool retorno  = repositorioAtendente.Excluir(atendente);
            bool retorno2 = repositorioAtendente.Excluir(atendente2);

            //Assert
            Assert.IsTrue(retorno);
            Assert.IsTrue(retorno2);
        }