//[Test] //[Category("CategoryDataTest")] public void TestMethod_EditCategory() { var category = _catProvider.GetCategories().Where(w => w.CategoryName == "UnityTestCat_CategoryTest").FirstOrDefault(); Assert.IsNotNull(category); category.CategoryName = "UnityTestCatModified_CategoryTest"; var result = _catProvider.EditCategory(category); Assert.AreEqual(result, 1); var searchCount = _catProvider.GetCategories().Where(w => w.CategoryName == "UnityTestCat_CategoryTest").ToList().Count; Assert.IsTrue(searchCount == 0); var searchCountMod = _catProvider.GetCategories().Where(w => w.CategoryName == "UnityTestCatModified_CategoryTest").ToList().Count; Assert.IsTrue(searchCountMod > 0); }