public void CreateMovieCategoriesListAddCategorySave() { using (MovieCategoriesList list = (MovieCategoriesList)ModulesManager.Current.OpenModuleObjectDetail(new MovieCategoriesListObject(Session), false)) { MovieCategoriesListView movieCategoriesListView = MovieCategoriesListView.LastCreatedView; MovieCategoryEdit categoryEdit = list.MovieCategoryEdit; list.CreateCategory(); Assert.AreNotEqual(categoryEdit, list.MovieCategoryEdit); list.Close(); } }
public void AddTwoCategories_DeleteThem() { using (MovieCategoriesList list = (MovieCategoriesList)ModulesManager.Current.OpenModuleObjectDetail(new MovieCategoriesListObject(Session), false)) { Guid firstOne = list.CreateCategory().Oid; list.CreateCategory(); Assert.IsTrue(list.MovieCategoriesEdit.DeleteCurrentRecord()); list.MovieCategoriesEdit.CurrentRecord = SessionHelper.GetObjectByKey <MovieCategory>(firstOne, list.MovieCategoriesEdit.VRObjectsEditObject.VideoRentObjects.Session); Assert.IsTrue(list.MovieCategoriesEdit.DeleteCurrentRecord()); list.Close(); } }