CapRaffle.UnitTests.CategoryControllerTests.Can_Save_New_Category C# (CSharp) Method

Can_Save_New_Category() private method

private Can_Save_New_Category ( ) : void
return void
        public void Can_Save_New_Category()
        {
            ViewResult target = (ViewResult)controller.Create();

            Category newCategory = target.Model as Category;
            newCategory.Name = "Soccer";

            var result = controller.Edit(newCategory);

            mock.Verify(m => m.SaveCategory(newCategory), Times.Once());
        }