Esempio n. 1
0
        public void GetDerivedClassesTest1()
        {
            var expected = new List <ClassDeclarationSyntax>
            {
                testAnalysis.GetClassDeclSyntax("ExampleCode2.DerivedAbstractClass"),
                testAnalysis.GetClassDeclSyntax("ExampleCode2.DerivedConcreteClass")
            };
            var actual = testAnalysis.GetDerivedClasses(testAnalysis.GetClassDeclSyntax("ExampleCode2.BaseClass"));

            CollectionAssert.AreEqual(expected, actual);
        }
        public void GetDerivedClassesTest1()
        {
            var expected = new List <ClassDeclarationSyntax>
            {
                testAnalysis.GetClassDeclSyntax("ExampleCode1.C2"),
                testAnalysis.GetClassDeclSyntax("ExampleCode1.C3_1"),
                testAnalysis.GetClassDeclSyntax("ExampleCode1.C3_2")
            };
            var actual = testAnalysis.GetDerivedClasses(testAnalysis.GetClassDeclSyntax("ExampleCode1.C1"));

            CollectionAssert.AreEqual(expected, actual);
        }