public void testApiDeletedCategoryIsNotInCategoriesList() { Category category = new Category("Category" + RandomStringUtil.RandomAlphaNumericString(5)); DoApiLogin(); CategoryActions.CreateCategoryViaApi(category); category.stock = 0; RestAdapter.DELETE(String.Format("/Category/Delete/{0}", category.categoryId)); List <Category> categories = jsonDeserializer.Deserialize <List <Category> >(RestAdapter.GET("/Category/Index")); CollectionAssert.DoesNotContain(categories, category, "Deleted category is in categories list"); }
public void testApiCreatedCategoryIsInTheCategoriesList() { Category category = new Category("Category" + RandomStringUtil.RandomAlphaNumericString(5)); DoApiLogin(); CategoryActions.CreateCategoryViaApi(category); category.stock = 0; List <Category> categories = jsonDeserializer.Deserialize <List <Category> >(RestAdapter.GET("/Category/Index")); CollectionAssert.Contains(categories, category, "Created category is not in categories list"); }