public Category Create(CreateCategoryCommand command)
        {
            var category = new Category(command.Title);
            category.Register();

            _repository.Create(category);

            if (Commit())
            {
                return category;
            }

            return null;
        }
 public void ShouldUpdateCategoryTitle()
 {
     var category = new Category("Placa Mãe");
     Assert.AreEqual(true, CategoryScopes.EditCategoryScopeIsValid(category, "MotherBoards"));
 }
 public void ShouldRegisterCategory()
 {
     var category = new Category("Placa Mãe");
     Assert.AreEqual(true, CategoryScopes.CreateCategoryScopeIsValid(category));
 }