public void PathSetEqualityWorks()
        {
            var pathSet1 = new ResourceGraphPathSet(new string[] { "1", "2", "3", });
            var pathSet2 = new ResourceGraphPathSet(new string[] { "2", "3", "1", });

            Assert.True(pathSet1.Equals(pathSet2));
            Assert.True(pathSet1 == pathSet2);
        }
        public void PathSetChildrenMatchesCorrectProperties()
        {
            var pathSet = new ResourceGraphPathSet(new string[]
            {
                "one",
                "one.two",
                "one.two.three",
                "two",
                "two.three",
                "three"
            });

            var oneChildren = pathSet.PathSetForChildProperty("one");

            Assert.Equal(2, oneChildren.Paths.Count);
        }
        public void PathSetAllNoneMatches()
        {
            var pathSetAll  = new ResourceGraphPathSet.All();
            var pathSetNone = new ResourceGraphPathSet.None();
            var pathSet     = new ResourceGraphPathSet(new string[]
            {
                "one",
                "one.two",
                "one.two.three",
                "two",
                "two.three",
                "three"
            });

            Assert.True(pathSetAll.MatchesProperty("random"));
            Assert.False(pathSetNone.MatchesProperty("random"));
            Assert.True(pathSet.MatchesProperty("one"));
            Assert.True(pathSet.MatchesProperty("three"));
        }
        public void PathSetIgnoresDuplicates()
        {
            var pathSet = new ResourceGraphPathSet(new string[] { "1", "2", "2", "3" });

            Assert.Equal(3, pathSet.Paths.Count);
        }