From a1ba1f0f862f37910944f6cfe49bd3fb9fb6c431 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 5 Jun 2018 17:07:44 -0700 Subject: [PATCH] Add more diagnostics to FileThumbPrint --- .../IntegrationTests/FIleThumbPrint.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs index 767f0242b6..36e204de0e 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs @@ -9,12 +9,15 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { public class FileThumbPrint : IEquatable { - private FileThumbPrint(DateTime lastWriteTimeUtc, string hash) + private FileThumbPrint(string path, DateTime lastWriteTimeUtc, string hash) { + Path = path; LastWriteTimeUtc = lastWriteTimeUtc; Hash = hash; } + public string Path { get; } + public DateTime LastWriteTimeUtc { get; } public string Hash { get; } @@ -30,12 +33,14 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests var hash = Convert.ToBase64String(hashBytes); var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path); - return new FileThumbPrint(lastWriteTimeUtc, hash); + return new FileThumbPrint(path, lastWriteTimeUtc, hash); } public bool Equals(FileThumbPrint other) { - return LastWriteTimeUtc == other.LastWriteTimeUtc && + return + string.Equals(Path, other.Path, StringComparison.Ordinal) && + LastWriteTimeUtc == other.LastWriteTimeUtc && string.Equals(Hash, other.Hash, StringComparison.Ordinal); }