Example #1
0
        public void CloseArtistDetailFromWithin()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false);
            ArtistsListView artistsListView = ArtistsListView.LastCreatedView;

            artistsListView.Module.OpenDetail(JamesCameron.Oid);
            ArtistDetailView detail = ArtistDetailView.LastCreatedView;

            detail.Module.Dispose();
            Assert.AreEqual(0, ModulesManager.Current.GetModulesForType(typeof(ArtistDetailObject)).Count);
            artistsListView.Module.Dispose();
        }
Example #2
0
        public void ChangeArtistByDetail_CheckUpdateInArtistsList()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false);
            ArtistsListView artistsListView = ArtistsListView.LastCreatedView;

            artistsListView.Module.OpenDetail(JamesCameron.Oid);
            ArtistDetailView detail       = ArtistDetailView.LastCreatedView;
            Artist           jamesCameron = new XPCollection <Artist>(artistsListView.Module.ArtistsEdit.VRObjectsEditObject.VideoRentObjects, CriteriaOperator.Parse("Oid = ?", JamesCameron.Oid))[0];

            detail.Module.ArtistEdit.VRObjectEditObject.VideoRentObject.Biography += "_Updated";
            string updatedBiography = detail.Module.ArtistEdit.VRObjectEditObject.VideoRentObject.Biography;

            detail.Module.SaveAndDispose();
            Assert.AreEqual(updatedBiography, jamesCameron.Biography);
            artistsListView.Module.Dispose();
        }
Example #3
0
        public void UnsubscribeEvents()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false);
            ArtistsListView artistsListView1 = ArtistsListView.LastCreatedView;

            artistsListView1.Module.Dispose();
            ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false);
            ArtistsListView artistsListView2 = ArtistsListView.LastCreatedView;

            artistsListView2.Module.OpenDetail(JamesCameron.Oid);
            ArtistDetailView detail       = ArtistDetailView.LastCreatedView;
            Artist           jamesCameron = new XPCollection <Artist>(artistsListView2.Module.ArtistsEdit.VRObjectsEditObject.VideoRentObjects, CriteriaOperator.Parse("FullName = ?", JamesCameron.FullName))[0];

            detail.Module.ArtistEdit.VRObjectEditObject.VideoRentObject.Biography += "_Updated";
            detail.Module.SaveAndDispose();
            artistsListView2.Module.Dispose();
        }
Example #4
0
 public ArtistDetailView(ArtistDetail artistDetail)
     : base(artistDetail)
 {
     LastCreatedView = this;
 }