public async void PostCreateNullName()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = await controller.Create(new Individual());

                CheckMessage(result, "An Individual must have a name.");
            }
        }
        public async void PostCreateBreedDoesntExist()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = await controller.Create(new Individual("Test Individual 11", 100));

                CheckMessage(result, "The selected Breed could not be found.");
            }
        }
        public async void PostCreateNegativeBreedId()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = await controller.Create(new Individual("Test Individual 11", -1));

                CheckMessage(result, $"The Breed ID must be between 1 and {int.MaxValue}.");
            }
        }
        public async void PostCreateZeroBreedId()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = await controller.Create(new Individual("Test Individual 11", 0));

                CheckMessage(result, "You must select a Breed for this Individual.");
            }
        }
        public void GetCreate()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = controller.Create();

                IndividualViewModel viewModel = CheckViewModel(result);

                Assert.Equal(0, viewModel.Individual.Id);
                Assert.Equal(0, viewModel.Individual.Breed.Id);
                Assert.True(string.IsNullOrEmpty(viewModel.Individual.Name));
                Assert.NotEmpty(viewModel.Breeds);
            }
        }
        public async void PostCreateSuccess()
        {
            using (var database = new TestDb())
            {
                var controller = new IndividualsController(database.Context);

                IActionResult result = await controller.Create(new Individual("Test Individual Success", 1));

                RedirectToActionResult redirect = Assert.IsType <RedirectToActionResult>(result);

                Assert.Equal("Index", redirect.ActionName);

                Individual individual = database.Context.Individuals.SingleOrDefault(i => i.Name == "Test Individual Success");

                Assert.False(individual == null);
            }
        }