private void SaveGame(object sender, EventArgs e) { SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.Filter = "txt files (*.txt)|*.txt"; saveDialog.InitialDirectory = @".\Saves"; saveDialog.RestoreDirectory = true; if (saveDialog.ShowDialog() == DialogResult.OK) { model.SaveGame(saveDialog.FileName); } }
public void SaveGameTest() { model.NewGame(29); Assert.AreEqual(true, model.SaveGame(@"..\..\..\..\TestFiles\test1.txt")); }