public void AssemblyBasedAssignableClassCreatorTestShouldReturnClassesInAssemblyList()
        {
            IList <IAssemblyBasedAssignableClassCreatorTest> expected = new List <IAssemblyBasedAssignableClassCreatorTest>();

            expected.Add(new AssemblyBasedAssignableClassCreatorTestInstance());

            CollectionAssert.AreEquivalent(expected, _creator.GetInstancesOf <IAssemblyBasedAssignableClassCreatorTest>());
        }
 /// <summary>
 /// Loads the factories from the provider
 /// </summary>
 /// <returns>The factories</returns>
 public IEnumerable <ILineFactory> GetFactories()
 {
     return(_creator.GetInstancesOf <ILineFactory>());
 }
 /// <summary>
 /// Loads the block rule factories from the provider
 /// </summary>
 /// <returns>The factory</returns>
 public IEnumerable <IBlockRuleFactory> GetBlockRuleFactories()
 {
     return(_creator.GetInstancesOf <IBlockRuleFactory>());
 }
 /// <summary>
 /// Loads the statement rule factories from the provider
 /// </summary>
 /// <returns>The factory</returns>
 public IEnumerable <IStatementRuleFactory> GetStatementRuleFactories()
 {
     return(_creator.GetInstancesOf <IStatementRuleFactory>());
 }
Пример #5
0
        /// <summary>
        /// Create a new instance of this class
        /// </summary>
        public AssemblyBasedRuleConfigurationFactoryProvider()
        {
            AssemblyBasedAssignableClassCreator creator = new AssemblyBasedAssignableClassCreator();

            _factories = new List <IRuleConfigurationFactory>(creator.GetInstancesOf <IRuleConfigurationFactory>());
        }