public async Task Delete_manufacturer_response_bad_request_with_message_when_manufacturer_hooked_with_product()
        {
            var cancellationToken = new CancellationToken();

            var expectedManufacturer =
                await _catalogContextFixture.Context.Manufacturers.ToListAsync(cancellationToken);

            if (expectedManufacturer.IsNullOrEmpty())
            {
                expectedManufacturer = await SeedManufacturer(cancellationToken);
            }

            Assert.NotEmpty(expectedManufacturer);

            var id = (await _catalogContextFixture.Context.Manufacturers.FirstOrDefaultAsync(
                          cancellationToken)).Id;
            // Act
            var manufacturerController = new ManufacturerController(_catalogContextFixture.Context,
                                                                    _fileUtilityFixture.FileUtility, _settings);
            var response = await manufacturerController.DeleteManufacturerAsync(id, cancellationToken);

            var responseMessage = Assert.IsType <BadRequestObjectResult>(response);

            Assert.Contains("Message", responseMessage.Value.ToString());
        }
        public async Task Delete_manufacturer_response_not_found_with_message_when_item_not_found()
        {
            var cancellationToken = new CancellationToken();
            // Arrange
            var expectedManufacturer =
                await _catalogContextFixture.Context.Manufacturers.ToListAsync(cancellationToken);

            if (expectedManufacturer.IsNullOrEmpty())
            {
                expectedManufacturer = await SeedManufacturer(cancellationToken);
            }

            Assert.NotEmpty(expectedManufacturer);

            // ReSharper disable once PossibleNullReferenceException
            var id = expectedManufacturer.LastOrDefault().Id++;

            // Act
            var manufacturerController = new ManufacturerController(_catalogContextFixture.Context,
                                                                    _fileUtilityFixture.FileUtility, _settings);
            var response = await manufacturerController.DeleteManufacturerAsync(id, cancellationToken);

            var responseMessage = Assert.IsType <NotFoundObjectResult>(response);

            Assert.Contains("Message", responseMessage.Value.ToString());
        }
        public async Task Delete_manufacturer_response_bad_request_with_message_when_id_less_or_equals_zero()
        {
            var id = 0;
            var cancellationToken = new CancellationToken();

            // Act
            var manufacturerController = new ManufacturerController(_catalogContextFixture.Context,
                                                                    _fileUtilityFixture.FileUtility, _settings);
            var response = await manufacturerController.DeleteManufacturerAsync(id, cancellationToken);

            var responseMessage = Assert.IsType <BadRequestObjectResult>(response);

            Assert.Contains("Message", responseMessage.Value.ToString());
        }