Ejemplo n.º 1
0
 public void CreateMoviesList()
 {
     using (MoviesList list = (MoviesList)ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false)) {
         MoviesListView moviesListView = MoviesListView.LastCreatedView;
         Assert.IsNotNull(moviesListView);
         Assert.IsNotNull(moviesListView.Module);
         Assert.AreEqual(list, moviesListView.Module);
     }
 }
Ejemplo n.º 2
0
        public void AddMovie()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView = MoviesListView.LastCreatedView;

            moviesListView.Module.OpenDetail(null);
            MovieDetailView.LastCreatedView.Module.Dispose();
            moviesListView.Module.Dispose();
        }
Ejemplo n.º 3
0
        public void CloseMovieDetailWithCloseAllDetails()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView = MoviesListView.LastCreatedView;

            moviesListView.Module.OpenDetail(Avatar.Oid);
            moviesListView.Module.OpenDetail(Nirvana.Oid);
            moviesListView.Module.CloseDetails();
            Assert.AreEqual(0, ModulesManager.Current.GetModulesForType(typeof(MovieDetailObject)).Count);
            moviesListView.Module.Dispose();
        }
Ejemplo n.º 4
0
        public void ChangeMovieByDetail_CheckUpdateInMoviesList()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView = MoviesListView.LastCreatedView;

            moviesListView.Module.OpenDetail(Avatar.Oid);
            MovieDetailView detail = MovieDetailView.LastCreatedView;
            Movie           avatar = new XPCollection <Movie>(moviesListView.Module.MoviesEdit.VRObjectsEditObject.VideoRentObjects, CriteriaOperator.Parse("Oid = ?", Avatar.Oid))[0];

            detail.Module.MovieEdit.VRObjectEditObject.VideoRentObject.Plot += "_Updated";
            string updatedPlot = detail.Module.MovieEdit.VRObjectEditObject.VideoRentObject.Plot;

            detail.Module.SaveAndDispose();
            Assert.AreEqual(updatedPlot, avatar.Plot);
            moviesListView.Module.Dispose();
        }
Ejemplo n.º 5
0
        public void UnsubscribeEvents()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView1 = MoviesListView.LastCreatedView;

            moviesListView1.Module.Dispose();
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView2 = MoviesListView.LastCreatedView;

            moviesListView2.Module.OpenDetail(Avatar.Oid);
            MovieDetailView detail = MovieDetailView.LastCreatedView;
            Movie           avatar = new XPCollection <Movie>(moviesListView2.Module.MoviesEdit.VRObjectsEditObject.VideoRentObjects, CriteriaOperator.Parse("Oid = ?", Avatar.Oid))[0];

            detail.Module.MovieEdit.VRObjectEditObject.VideoRentObject.Plot += "_Updated";
            detail.Module.SaveAndDispose();
            moviesListView2.Module.Dispose();
        }
Ejemplo n.º 6
0
 public MoviesListView(MoviesList moviesList)
     : base(moviesList)
 {
     LastCreatedView = this;
 }