コード例 #1
0
        public override void Verify(string parentPath)
        {
            string path = Path.Combine(parentPath, Name);

            File.Exists(path).Should().BeTrue(because: $"File '{path}' should exist.");
            File.GetLastWriteTimeUtc(path).Should().Be(LastWrite, because: $"File '{path}' should have correct last-write time.");

            if (IsExecutable)
            {
                bool isExecutable = UnixUtils.IsUnix
                    ? FileUtils.IsExecutable(path)
                    : FlagUtils.IsFlagged(FlagUtils.XbitFile, path);
                isExecutable.Should().BeTrue(because: $"File '{path}' should be executable.");
            }
        }