Пример #1
0
        public Category Register(string title)
        {
            var category = new Category(title);
            category.Register();

            _repository.Register(category);

            Commit();

            return category;
        }
Пример #2
0
 public void ShouldNotRegisterCategoryWhenTitleIsNullOrEmpty()
 {
     var category = new Category(null);
     Assert.AreEqual(false, category.RegisterScopeIsValid());
 }
Пример #3
0
 public void Register(Category category)
 {
     _context.Categories.Add(category);
 }