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)
19
public 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.");
35
var lastWriteTimeUtc =
_fileInfo
.LastWriteTimeUtc;
42
var actualSha256 = algorithm.ComputeHash(File.ReadAllBytes(
_fileInfo
.FullName));
45
actualSha256Base64.Should().Be(expectedSha, $"File {
_fileInfo
.FullName} did not have SHA matching {expectedSha}. Found {actualSha256Base64}.");
51
var actualContent = File.ReadAllText(
_fileInfo
.FullName);
52
actualContent.Should().Contain(expectedContent, $"File {
_fileInfo
.FullName} did not have content: {expectedContent}.");
63
var actualContent = File.ReadAllText(
_fileInfo
.FullName);
64
actualContent.Should().MatchRegex(pattern, $"File {
_fileInfo
.FullName} did not match pattern: {pattern}.");
70
var actualContent = File.ReadAllText(
_fileInfo
.FullName);
71
actualContent.Should().NotContain(expectedContent, $"File {
_fileInfo
.FullName} had content: {expectedContent}.");