1 write to _fileInfo
Microsoft.NET.TestFramework (1)
Assertions\FileInfoAssertions.cs (1)
16_fileInfo = file;
14 references to _fileInfo
Microsoft.NET.TestFramework (14)
Assertions\FileInfoAssertions.cs (14)
19public FileInfo FileInfo => _fileInfo; 23_fileInfo.Exists.Should().BeTrue($"Expected File {_fileInfo.FullName} to exist, but it does not."); 29_fileInfo.Exists.Should().BeFalse($"Expected File {_fileInfo.FullName} to not exist, but it does."); 35var lastWriteTimeUtc = _fileInfo.LastWriteTimeUtc; 42var actualSha256 = algorithm.ComputeHash(File.ReadAllBytes(_fileInfo.FullName)); 45actualSha256Base64.Should().Be(expectedSha, $"File {_fileInfo.FullName} did not have SHA matching {expectedSha}. Found {actualSha256Base64}."); 51var actualContent = File.ReadAllText(_fileInfo.FullName); 52actualContent.Should().Contain(expectedContent, $"File {_fileInfo.FullName} did not have content: {expectedContent}."); 63var actualContent = File.ReadAllText(_fileInfo.FullName); 64actualContent.Should().MatchRegex(pattern, $"File {_fileInfo.FullName} did not match pattern: {pattern}."); 70var actualContent = File.ReadAllText(_fileInfo.FullName); 71actualContent.Should().NotContain(expectedContent, $"File {_fileInfo.FullName} had content: {expectedContent}.");