Edit() публичный Метод

Обновление категории
public Edit ( CategoryViewModel categoryView ) : void
categoryView CategoryViewModel
Результат void
Пример #1
0
 public void EditTest()
 {
     ICategoryService _categoryService = new CategoryService(new CategoryRepository(), new CategoryFilterFactory());
     CategoryViewModel _categoryViewModel = GetCategoryViewModel();
     _categoryService.Add(_categoryViewModel);
     _categoryViewModel.Description = "otherDescription";
     _categoryService.Edit(_categoryViewModel);
     bool actual, expected = true;
     if(_categoryService.GetByID(1).Description.CompareTo("otherDescription") == 0)
     {
         actual = true;
     }
     else
     {
         actual = false;
     }
     Assert.AreEqual(expected, actual);
 }