Пример #1
0
        public void CanDeriveAllNestedSubclasses()
        {
            var allReflectionDerivedSubclassesOfA = new List <A>();

            allReflectionDerivedSubclassesOfA.AddRange(ReflectionTools.GetAllDerivedInstancesOfType <A>());

            Assert.AreEqual(3, allReflectionDerivedSubclassesOfA.Count);
            for (var i = 0; i < allSubclassesOfA.Count; i++)
            {
                Assert.IsTrue(allReflectionDerivedSubclassesOfA.Exists(x => x.GetType() == allSubclassesOfA[i].GetType()));
            }
        }