public void NullFilenameThrows() { XunitProject project = new XunitProject(); project.AddAssembly(new XunitProjectAssembly { AssemblyFilename = "foo" }); Assert.Throws<ArgumentNullException>(() => project.SaveAs(null)); }
public void ProjectIsMarkedCleanWhenSaved() { using (TempFile tempFile = new TempFile()) { XunitProject project = new XunitProject(); XunitProjectAssembly assembly = new XunitProjectAssembly { AssemblyFilename = @"C:\FooBar" }; project.AddAssembly(assembly); project.SaveAs(tempFile.Filename); Assert.False(project.IsDirty); } }
public void FilenameIsUpdated() { using (TempFile tempFile = new TempFile()) { XunitProject project = new XunitProject(); XunitProjectAssembly assembly = new XunitProjectAssembly { AssemblyFilename = @"C:\FooBar" }; project.AddAssembly(assembly); project.SaveAs(tempFile.Filename); Assert.Equal(tempFile.Filename, project.Filename); } }