Пример #1
0
        public void ExploreAssembly(IMetadataAssembly assembly, IProject project, UnitTestElementConsumer consumer)
        {
            var a = Assembly.LoadFrom(assembly.Location);
            var specTypes = FilterToSpecs(a.GetTypes());

            var elementFactory = new ElementFactory(project, consumer, _provider);

            foreach (var type in specTypes)
            {
                var instance = Activator.CreateInstance(type);

                var spec = (instance is ISpec) ?  (ISpec)instance : new SpecWrapper(instance);

                elementFactory.CreateContainerElements(spec);
            }
        }