コード例 #1
0
        public void FullFilesDontAffectThePlaceholderDatabase()
        {
            string testFile = Path.Combine(this.Enlistment.RepoRoot, "FullFilesDontAffectThePlaceholderDatabase");

            string placeholderDatabase = Path.Combine(this.Enlistment.DotGVFSRoot, "databases", "PlaceholderList.dat");
            string placeholdersBefore  = GVFSHelpers.ReadAllTextFromWriteLockedFile(placeholderDatabase);

            this.fileSystem.CreateEmptyFile(testFile);

            this.Enlistment.WaitForBackgroundOperations().ShouldEqual(true, "Background operations failed to complete.");
            GVFSHelpers.ReadAllTextFromWriteLockedFile(placeholderDatabase).ShouldEqual(placeholdersBefore);

            this.fileSystem.DeleteFile(testFile);

            this.Enlistment.WaitForBackgroundOperations().ShouldEqual(true, "Background operations failed to complete.");
            GVFSHelpers.ReadAllTextFromWriteLockedFile(placeholderDatabase).ShouldEqual(placeholdersBefore);
        }