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

            artistsListView.Module.OpenDetail(null);
            ArtistDetailView.LastCreatedView.Module.Dispose();
            artistsListView.Module.Dispose();
        }
예제 #2
0
 public void CreateArtistsList()
 {
     using (ArtistsList list = (ArtistsList)ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false)) {
         ArtistsListView artistsListView = ArtistsListView.LastCreatedView;
         Assert.IsNotNull(artistsListView);
         Assert.IsNotNull(artistsListView.Module);
         Assert.AreEqual(list, artistsListView.Module);
     }
 }
예제 #3
0
        public void CloseArtistDetailWithCloseAllDetails()
        {
            ModulesManager.Current.OpenModuleObjectDetail(new ArtistsListObject(Session), false);
            ArtistsListView artistsListView = ArtistsListView.LastCreatedView;

            artistsListView.Module.OpenDetail(JamesCameron.Oid);
            artistsListView.Module.OpenDetail(UweBoll.Oid);
            artistsListView.Module.CloseDetails();
            Assert.AreEqual(0, ModulesManager.Current.GetModulesForType(typeof(ArtistDetailObject)).Count);
            artistsListView.Module.Dispose();
        }
예제 #4
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();
        }
예제 #5
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();
        }
예제 #6
0
 public ArtistsListView(ArtistsList moviesList)
     : base(moviesList)
 {
     LastCreatedView = this;
 }