public void CurrentGenres_Should_Redirect_Back_When_Genre_Exists()
        {
            bookService.Setup(x => x.Genres()).Returns(new List <BookGenreOutputModel>()
            {
                new BookGenreOutputModel()
                {
                    GenreName = "Horror"
                },
                new BookGenreOutputModel()
                {
                    GenreName = "Fantasy"
                }
            });

            var genreName = "asd";

            adminService.Setup(x => x.AddGenre(genreName)).Returns(GlobalConstants.Failed);

            var adminController =
                new BookCreatorApp.Areas.Administration.Controllers.AdminsController(adminService.Object,
                                                                                     bookService.Object);

            var result = adminController.CurrentGenres(genreName);

            string expected = string.Join(GlobalConstants.AlreadyExistsInDb, genreName);

            result.As <ViewResult>().ViewData.ContainsKey(GlobalConstants.Error).Equals(expected);
        }
        public void CurrentGenres_Should_Return_Correct_View_With_Empty_String_On_Post()
        {
            bookService.Setup(x => x.Genres()).Returns(new List <BookGenreOutputModel>()
            {
                new BookGenreOutputModel()
                {
                    GenreName = "Horror"
                },
                new BookGenreOutputModel()
                {
                    GenreName = "Fantasy"
                }
            });

            var adminController = new BookCreatorApp.Areas.Administration.Controllers.AdminsController(adminService.Object, bookService.Object);

            var result = adminController.CurrentGenres(null);

            result.As <ViewResult>().ViewData
            .ContainsKey(GlobalConstants.Error)
            .Equals(GlobalConstants.NullName);
        }