public void IsValid_ShouldBeTrue_WhenListTitleIsUnique()
        {
            var command = new UpdateCategoryCommand
            {
                Id           = 1,
                CategoryName = "Shopping"
            };

            var validator = new UpdateCategoryCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(true);
        }
        public void IsValid_ShouldBeFalse_WhenListTitleIsNotUnique()
        {
            Context.Categories.Add(new Category {
                CategoryName = "Shopping"
            });
            Context.SaveChanges();

            var command = new UpdateCategoryCommand
            {
                Id           = 2,
                CategoryName = "Shopping"
            };

            var validator = new UpdateCategoryCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }