예제 #1
0
        public void Obter_Historico()
        {
            //Arrange
            HistoricoController controller = new HistoricoController(contexto);
            //Act
            var result = controller.Listar(1);

            //Assert
            Assert.IsNotInstanceOfType(result, typeof(BadRequestResult));
        }
예제 #2
0
        public void Nao_Obter_Historico()
        {
            //Arrange
            HistoricoController controller = new HistoricoController(contexto);

            contexto.Historicos.RemoveRange(contexto.Historicos);
            contexto.SaveChanges();
            //Act
            var result = controller.Listar(214748364);

            //Assert
            Assert.IsInstanceOfType(result, typeof(BadRequestErrorMessageResult));
        }