CatalogueRecipes() public method

public CatalogueRecipes ( ) : IList
return IList
Exemplo n.º 1
0
        public void Cataloger_Uses_Search_Locations()
        {
            var config = new Configuration();
            var cataloger = new RecipeCataloger(Environment.CurrentDirectory);
            cataloger.CatalogueRecipes();
            config.SearchPaths.AddRange(cataloger.LoadedAssembliesContainingRecipes.Select(la => la.File.FullName));
            Assert.Greater(cataloger.AssembliesExamined.Count, 1);

            var cataloger2 = new RecipeCataloger(config.SearchPaths.ToArray());
            cataloger2.CatalogueRecipes();
            Assert.AreEqual(1, cataloger2.AssembliesExamined.Count);
        }
Exemplo n.º 2
0
        public void Can_Automatically_Generate_First_Config_File()
        {
            Assert.IsFalse(Configuration.ConfigFileExists);

            var config = new Configuration();

            Assert.IsTrue(config.IsNew);
            Assert.IsTrue(Configuration.ConfigFileExists);

            var cataloger = new RecipeCataloger(Environment.CurrentDirectory);
            cataloger.CatalogueRecipes();

            if(config.IsNew)
                config.SearchPaths.AddRange(
                    cataloger.LoadedAssembliesContainingRecipes.Select(la=>la.Assembly.FullName)
                    );

            config.Save();

            var config2 = new Configuration();
            Assert.IsFalse(config2.IsNew);
            Assert.AreEqual(1, config2.SearchPaths.Count);
        }
Exemplo n.º 3
0
 public void Before_Each_Test_Is_Run()
 {
     cataloger = new RecipeCataloger(Environment.CurrentDirectory + "..\\..\\..\\..\\");
     found = cataloger.CatalogueRecipes();
 }
Exemplo n.º 4
0
 public void Finder_Caches_Assemblies_Containing_Recipes()
 {
     var cataloger = new RecipeCataloger(Environment.CurrentDirectory);
     cataloger.CatalogueRecipes();
     Assert.AreEqual(1, cataloger.LoadedAssembliesContainingRecipes.Count);
 }