private void ExpectHashKnown(FileContentTable table, AbsolutePath path, ContentHash hash)
        {
            VersionedFileIdentityAndContentInfo?maybeKnownHash = table.TryGetKnownContentHash(path.ToString(m_pathTable));

            XAssert.IsTrue(maybeKnownHash.HasValue, "Loaded table is missing the entry for {0}", path.ToString(m_pathTable));
            XAssert.AreEqual(hash, maybeKnownHash.Value.FileContentInfo.Hash, "Incorrect known hash for a file that should be known");
            XAssert.AreEqual(VersionedFileIdentity.IdentityKind.StrongUsn, maybeKnownHash.Value.Identity.Kind);
        }
        private void ExpectHashUnknown(FileContentTable table, AbsolutePath path)
        {
            VersionedFileIdentityAndContentInfo?maybeKnownHash = table.TryGetKnownContentHash(path.ToString(m_pathTable));

            XAssert.IsFalse(maybeKnownHash.HasValue, "Loaded table has an unexpected entry for {0}", path.ToString(m_pathTable));
        }
Example #3
0
 public VersionedFileIdentityAndContentInfo?GetKnownContentHashes(AbsolutePath path)
 {
     return(m_fileContentTable.TryGetKnownContentHash(path.ToString(m_pathTable)));
 }