public void EmprestimoRepositorio_GetAll_ShouldBeOk()
        {
            int sizeListExpected = 1;
            var result           = _service.GetAll();

            result.Should().NotBeNull();
            result.Count().Should().Be(sizeListExpected);
        }
示例#2
0
        public async Task <IActionResult> Index()
        {
            ViewBag.Emprestimos = await _emprestimoService.GetAll();

            ViewBag.Games = await _gameService.GetAll();

            ViewBag.Amigos = await _amigoService.GetAll();

            return(View());
        }
示例#3
0
        public async Task <IActionResult> Index()
        {
            try
            {
                var emprestimoViewModels = await _emprestimoService.GetAll();

                return(View(emprestimoViewModels));
            }
            catch (Exception)
            {
                TratarErro();
            }

            return(View());
        }