예제 #1
0
        public void CreateMovieDetail_CheckAllCountries()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView = MovieDetailView.LastCreatedView;

            Assert.IsNotNull(movieDetailView);
            Assert.IsNotNull(movieDetailView.Module);
            Assert.IsNotNull(movieDetailView.Module.MovieEdit.CountryEditData.List);
            movieDetailView.Module.Dispose();
        }
예제 #2
0
        public void OpenSameMovieDetailTwice()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView1 = MovieDetailView.LastCreatedView;

            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView2 = MovieDetailView.LastCreatedView;

            Assert.AreEqual(movieDetailView1, movieDetailView2);
            movieDetailView1.Module.Dispose();
        }
예제 #3
0
        public void ChangeMovie_SaveAndDispose()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView = MovieDetailView.LastCreatedView;

            movieDetailView.Module.MovieEdit.VRObjectEditObject.VideoRentObject.Awards = "new Awards";
            movieDetailView.Module.SaveAndDispose();
            Assert.IsTrue(movieDetailView.Module.Disposed);
            Avatar.Reload();
            Assert.AreEqual("new Awards", Avatar.Awards);
        }
예제 #4
0
        public void CloseMovieDetailFromWithin()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MoviesListObject(Session), false);
            MoviesListView moviesListView = MoviesListView.LastCreatedView;

            moviesListView.Module.OpenDetail(Avatar.Oid);
            MovieDetailView detail = MovieDetailView.LastCreatedView;

            detail.Module.Dispose();
            Assert.AreEqual(0, ModulesManager.Current.GetModulesForType(typeof(MovieDetailObject)).Count);
            moviesListView.Module.Dispose();
        }
예제 #5
0
        public void OpenMovieDetail_Close_OpenSecondTime()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView1 = MovieDetailView.LastCreatedView;

            movieDetailView1.Module.Close();
            ModulesManager.Current.OpenModuleObjectDetail(new MovieDetailObject(Session, Avatar.Oid), true);
            MovieDetailView movieDetailView2 = MovieDetailView.LastCreatedView;

            Assert.AreNotEqual(movieDetailView1, movieDetailView2);
            movieDetailView1.Module.Dispose();
            movieDetailView2.Module.Dispose();
        }
예제 #6
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();
        }
예제 #7
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();
        }
예제 #8
0
 public MovieDetailView(MovieDetail movieDetail)
     : base(movieDetail)
 {
     LastCreatedView = this;
 }