public void NullFilenameThrows() { var project = new XunitProject(); project.AddAssembly(new XunitProjectAssembly { AssemblyFilename = "foo" }); Assert.Throws <ArgumentNullException>(() => project.SaveAs(null)); }
public void ProjectIsMarkedCleanWhenSaved() { using (var tempFile = new TempFile()) { var project = new XunitProject(); var assembly = new XunitProjectAssembly { AssemblyFilename = @"C:\FooBar" }; project.AddAssembly(assembly); project.SaveAs(tempFile.Filename); Assert.False(project.IsDirty); } }
public void FilenameIsUpdated() { using (var tempFile = new TempFile()) { var project = new XunitProject(); var assembly = new XunitProjectAssembly { AssemblyFilename = @"C:\FooBar" }; project.AddAssembly(assembly); project.SaveAs(tempFile.Filename); Assert.Equal(tempFile.Filename, project.Filename); } }
void SaveProject(string filename) { try { project.SaveAs(filename); mruProjectList.Add(filename); } catch (Exception ex) { MessageBox.Show("Error loading project:\r\n\r\n" + ex.Message, windowTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } UpdateProjectDynamicMenus(); UpdateRunState(); }