public Category Register(string title)
        {
            var category = new Category(title);
            category.Register();

            _repository.Register(category);

            Commit();

            return category;
        }
 public void ShouldNotRegisterCategoryWhenTitleIsNullOrEmpty()
 {
     var category = new Category(null);
     Assert.AreEqual(false, category.RegisterScopeIsValid());
 }
 public void Register(Category category)
 {
     _context.Categories.Add(category);
 }