private TestFixtureDependencyChainer()
        {
            var types =
                from assembly in AppDomain.CurrentDomain.GetAssemblies()
                from type in assembly.GetExportedTypes()
                where type.GetCustomAttribute <TestFixtureAttribute>() != null
                select new TestCaseWrapper(new TestFixtureDescriptor(type));

            this._testCaseDescriptors.AddRange(DependencySorter.Sort(types));
        }
예제 #2
0
        private TestMethodDependencyChainer()
        {
            var excludedMethodNames = new[] { nameof(this.GetHashCode), nameof(Equals), nameof(this.ToString), nameof(this.GetType) };
            var types =
                from assembly in AppDomain.CurrentDomain.GetAssemblies()
                from type in assembly.GetExportedTypes()
                where type.GetCustomAttribute <TestFixtureAttribute>() != null
                from method in type.GetMethods(BindingFlags.Instance | BindingFlags.Public)
                where Array.IndexOf(excludedMethodNames, method.Name) == -1
                select new TestCaseWrapper(new TestCaseDescriptor(method.Name, type));

            this._testCaseDescriptors.AddRange(DependencySorter.Sort(types));
        }