Ejemplo n.º 1
0
        public async Task StorageLocation_GetAllAsync()
        {
            var listStorageLocationtModel = _fixture.CreateMany <StorageLocationViewModel>();

            _mockStorageLocationRepository.Setup(m => m.GetAllAsync()).ReturnsAsync(listStorageLocationtModel.ToList());

            var StorageLocationtModel = await _storageLocationService.GetAllAsync();

            StorageLocationtModel.Should().BeOfType <List <StorageLocationViewModel> >();
            Mock.VerifyAll();
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> GetAll()
 {
     try
     {
         return(Ok(await _storageLocationService.GetAllAsync()));
     }
     catch (Exception ex)
     {
         return(BadRequest($"Erro ao buscar localizacoes ({ex})"));
     }
 }