public async Task <ActionResult <ProductionLineDTO> > GetProductionLineById(Guid id)
        {
            try
            {
                ProductionLine productionLine = await _serviceProductionLine.GetProductionLineById(id);

                return(productionLine.toDTO());
            }
            catch (KeyNotFoundException e)
            {
                return(NotFound(e.Message));
            }
        }
        public async void EnsureProductionLineIsNotFoundById()
        {
            var context = ContextMocker.GetContextMock();

            ContextMocker.SeedProductionLines(context);

            var ProductionLineService = new ProductionLineService(context);

            var ProductionLineId = new Guid("11113111-2222-2222-2222-111111111111");

            await Assert.ThrowsAsync <KeyNotFoundException>(() => (ProductionLineService.GetProductionLineById(ProductionLineId)));
        }
        public async void EnsureProductionLineIsFoundById()
        {
            var context = ContextMocker.GetContextMock();

            ContextMocker.SeedProductionLines(context);

            var ProductionLineService = new ProductionLineService(context);


            var ProductionLineId                  = new Guid("12111111-1111-1111-1111-111111111111");
            var expectedProductionLineId          = new Guid("12111111-1111-1111-1111-111111111111");
            var expectedMachineId                 = new Guid("11111111-1111-1111-1111-111111111111");
            var expectedProductionLineDescription = new ProductionLineDescription("Linha1");
            var result = await ProductionLineService.GetProductionLineById(ProductionLineId);

            Assert.Equal(expectedProductionLineId, result.Id);
            Assert.Equal(expectedProductionLineDescription, result.Description);
            Assert.Equal(expectedMachineId, result.Machines[0].Id);
        }