示例#1
0
 public void DataStore_Save_WithoutPath_RunsSaveAsAndSaves()
 {
     DocumentViewModel document = new DocumentViewModel();
     StubbDataStore dataStore = new StubbDataStore();
     dataStore.Save(document);
     Assert.IsTrue(dataStore.SaveAsRun && dataStore.DidSerialize,
         "Both 'SaveAsRun' and 'DidSerialize' should be true.");
 }
示例#2
0
        public void DataStore_Save_WithPathSavesFile()
        {
            DocumentViewModel document = new DocumentViewModel();
            document.DocumentPath = "C:\\MyDocument.chords";

            StubbDataStore dataStore = new StubbDataStore();
            dataStore.Save(document);
            Assert.IsTrue(dataStore.DidSerialize,
                "File should have been saved, but was not.");
        }