public void DataStore_SaveAs_SavesFile() { DocumentViewModel document = new DocumentViewModel(); StubbDataStore dataStore = new StubbDataStore(); dataStore.SaveAs(document); Assert.IsTrue(dataStore.DidSerialize, "File should have been saved, but was not."); }
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."); }
public void DataStore_Open_OpensTestDocument() { DocumentViewModel document = new DocumentViewModel(); StubbDataStore dataStore = new StubbDataStore(); dataStore.Open(ref document); Assert.IsTrue(document.ChordLines.Count == 1, "There should be 1 line in the document"); }
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."); }