public void CorruptFix( FilePath path, [Frozen] MockFileSystem fs, CorruptError sut) { fs.File.WriteAllText(path, "Whut"); sut.RunFix(path); var doc = XDocument.Load(fs.FileStream.Create(path, FileMode.Open, FileAccess.Read)); doc.Should().BeEquivalentTo(NotExistsError.TypicalFile()); }
public void NoConfigurationFix( FilePath path, [Frozen] MockFileSystem fs, CorruptError sut) { fs.File.WriteAllText(path, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<something />"); sut.RunFix(path); var doc = XDocument.Load(fs.FileStream.Create(path, FileMode.Open, FileAccess.Read)); doc.Should().BeEquivalentTo(NotExistsError.TypicalFile()); }