示例#1
0
        public void OneDeepRootAncestor()
        {
            var file1   = new SourceFile(string.Empty, @"C:\", new IContained[] { }, string.Empty, new List <FileLine>());
            var project = new Project(new[] { file1 });

            Assert.AreEqual(project, Traversal.AncestorOfType <Project>(file1));
        }
示例#2
0
        public void NoAncestor()
        {
            var desc    = new Description(new XElement("Basic"), new XElement("Detail"), new List <FileLine>());
            var file1   = new SourceFile(string.Empty, @"C:\", new[] { desc }, string.Empty, new List <FileLine>());
            var project = new Project(new[] { file1 });

            Assert.AreEqual(null, Traversal.AncestorOfType <InformationValue>(desc));
        }