예제 #1
0
        public void Forced_corporation_returns_empty_list_on_null()
        {
            // Do not access the corporation directly as that's the purpose of the
            // language specific factory. However, I want to test these two side
            // cases.
            var corp    = new RDomCorporation(LanguageNames.CSharp, RDom.CSharp);
            var result1 = corp.GetSyntaxNodes(null);

            Assert.IsFalse(result1.Any());
        }
예제 #2
0
 public void Forced_corporation_throws_on_non_implemented_item()
 {
     Assert.Inconclusive();
     var csharpCode = @"public classX x {}";
     var root       = RDom.CSharp.Load(csharpCode);
     // Do not access the corporation directly as that's the purpose of the
     // language specific factory. However, I want to test these two side
     // cases.
     var corp    = new RDomCorporation(LanguageNames.CSharp, RDom.CSharp);
     var a       = new ClassA();
     var result1 = corp.GetSyntaxNodes(a);
 }
예제 #3
0
        internal IEnumerable <SyntaxNode> GetSyntaxGroup(IDom item)
        {
            var nodes = corporation.GetSyntaxNodes(item);

            return(nodes);
        }