Esempio n. 1
0
 public void BackupDataViewModelConstructorTest()
 {
     BackupData backupData = null; // TODO: Initialize to an appropriate value
     BackupDataViewModel target = new BackupDataViewModel(backupData);
     // Todo: Guard checks for initialization arguments.
     /*AssertEx.IsNull(target.DatasetName);
     string expected = "A new name.";
     string actual;
     target.DatasetName = expected;
     actual = target.DatasetName;
     Assert.AreEqual(expected, actual);*/
 }
Esempio n. 2
0
 /// <summary>
 /// Opens a new set of Backup Data from the specified file name.
 /// </summary>
 /// <param name="path">The full path to the backup data file on disk.</param>
 internal void OpenFile(string path)
 {
     // Todo: switch this to this.dataprovider.Load( ... );
     //this.Data2 = ModelLoader.LoadBackupData(path);
     this.Data2 = dataprovider.Load(path, new MyPrincipal(), null);
     Data = new BackupDataViewModel(this.Data2);
     //this.mainWindow.Designer.DataContext = bdvm;
 }
Esempio n. 3
0
        /// <summary>
        /// Unregisters this instance from the Messenger class.
        /// <para>To cleanup additional resources, override this method, clean
        /// up and then call base.Cleanup().</para>
        /// </summary>
        public override void Cleanup()
        {
            if (this.generalCommands != null)
            {
                this.generalCommands.CleanUp();
            }

            if (this.generalCommands != null)
            {
                this.bdvm.Cleanup();
            }

            // etc.
            this.bdvm = null;
            //this.generalCommands = null;
            base.Cleanup();
        }
Esempio n. 4
0
 public void SetUp()
 {
     BackupData backupData = new BackupData();
     backupData.DatasetName = "My Data Set";
     target = new BackupDataViewModel(backupData);
 }