[Trait("Category", "WindowsOSOnly")] // Paths are case-sensitive on Linux-based systems.
        public void RoundTripSerializationNormalizesCasingAndRemovesDuplicatesInObservedAccessedFileNames()
        {
            var pathTable = new PathTable();
            var pathSet   = ObservedPathSetTestUtilities.CreatePathSet(
                pathTable,
                observedAccessedFileNames: new string[] { "d", "D", "f" },
                X("/X/a/b/c"));

            var roundtrip = SerializeRoundTripAndAssertEquivalent(pathTable, pathSet);

            ObservedPathSetTestUtilities.AssertPathSetContainsDuplicates(pathSet);
            ObservedPathSetTestUtilities.AssertPathSetDoesNotContainDuplicates(roundtrip);
        }
示例#2
0
        public void RoundTripSerializationRemovesDuplicatesWithUnrelatedPaths()
        {
            var pathTable = new PathTable();
            var pathSet   = ObservedPathSetTestUtilities.CreatePathSet(
                pathTable,
                X("/X/a/b/c"),
                X("/X/a/b/c"),
                X("/Y/d/e/f"),
                X("/Y/d/e/f"));

            var roundtrip = SerializeRoundTripAndAssertEquivalent(pathTable, pathSet);

            ObservedPathSetTestUtilities.AssertPathSetContainsDuplicates(pathSet);
            ObservedPathSetTestUtilities.AssertPathSetDoesNotContainDuplicates(roundtrip);
        }