public async Task When_Error_Exceeds_Maximun_Limint_Products_In_Warehouse()
        {
            //Arrange
            var loggerMock = new Mock <ILogger <MovementService> >();
            Mock <IGenericRepository <Movement> > repositoryMovementMock = new MockMovementRepository().Queryable();
            Mock <IGenericRepository <Product> >  repositoryProductMock  = new MockProductRepository()
                                                                           .GetProductByIdAsync()
                                                                           .UpdateProductAsync()
                                                                           .Queryable();
            var mockUnitOfWork = new MockUnitOfWork().MovementRepository(repositoryMovementMock)
                                 .ProductRepository(repositoryProductMock)
                                 .SaveChangesAsync();
            var movementService = new MovementService(mockUnitOfWork.Object, loggerMock.Object);

            Movement movement = new Movement
            {
                Type        = true,
                Quantity    = 325,
                ProductId   = Guid.Parse("B99BC862-C515-4D61-97D8-4D2B188A19F3"),
                WarehouseId = Guid.Parse("C347ED5D-1F33-49EE-A58D-B7F2310192A6")
            };

            Exception exception = null;

            //Act
            try
            {
                await movementService.InsertProductWareahouse(movement);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            //Assert
            Assert.True("Only 320 units of the selected product can be loaded." == exception.Message);
            Assert.True(typeof(BusinessException) == exception.GetType());
        }
        public async Task When_Error_Threshold_Products_In_Warehouse()
        {
            //Arrange
            var loggerMock = new Mock <ILogger <MovementService> >();
            Mock <IGenericRepository <Movement> > repositoryMovementMock = new MockMovementRepository().Queryable();
            Mock <IGenericRepository <Product> >  repositoryProductMock  = new MockProductRepository()
                                                                           .GetProductByIdAsync()
                                                                           .UpdateProductAsync()
                                                                           .Queryable();
            var mockUnitOfWork = new MockUnitOfWork().MovementRepository(repositoryMovementMock)
                                 .ProductRepository(repositoryProductMock)
                                 .SaveChangesAsync();
            var movementService = new MovementService(mockUnitOfWork.Object, loggerMock.Object);

            Movement movement = new Movement
            {
                Type        = true,
                Quantity    = 11000,
                ProductId   = Guid.Parse("B99BC862-C515-4D61-97D8-4D2B188A19F3"),
                WarehouseId = Guid.Parse("C347ED5D-1F33-49EE-A58D-B7F2310192A6")
            };

            Exception exception = null;

            //Act
            try
            {
                await movementService.InsertProductWareahouse(movement);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            //Assert
            Assert.True("No more products can be loaded, as they exceed the established threshold. For logistical reasons there is no place to store them." == exception.Message);
            Assert.True(typeof(BusinessException) == exception.GetType());
        }