public async void ShouldReturnTheANewlyCreatedShoppingList()
        {
            var shoppingList = new ShoppingList
            {
                ShoppingListId = 1,
                Name           = "Test",
                CreatedAt      = DateTime.Now,
                LastUpdated    = DateTime.Now
            };

            var apiResponse = new ApiResponse(HttpStatusCode.Created)
            {
                Result = shoppingList
            };

            var mockService = new Mock <IShoppingListService <IApiResponse> >();

            mockService.Setup(mock => mock.AddAsync(shoppingList.Name))
            .ReturnsAsync(apiResponse);

            _service    = mockService.Object;
            _controller = new ShoppingListController(_service);


            IActionResult result = await _controller.AddNewShoppingList(shoppingList.Name);


            result.Should().BeOfType <ObjectResult>()
            .Which.Value.Should().BeAssignableTo <IApiResponse>()
            .Which.Should().Match <IApiResponse>(response =>
                                                 response.StatusCode == HttpStatusCode.Created &&
                                                 response.Message == null &&
                                                 response.Result != null);
        }
        public async void ShouldReturnABadRequestResultWhenAnEmptyStringIsPassed(string data)
        {
            _service    = Mock.Of <IShoppingListService <IApiResponse> >();
            _controller = new ShoppingListController(_service);


            IActionResult result = await _controller.AddNewShoppingList(data);


            result.Should().BeOfType <ObjectResult>()
            .Which.Value.Should().BeAssignableTo <IApiResponse>()
            .Which.Should().Match <IApiResponse>(response =>
                                                 response.StatusCode == HttpStatusCode.BadRequest &&
                                                 response.Message.Equals("The shopping list must have a name.") &&
                                                 response.Result == null);
        }