public void should_load_assembly_for_project() { BottlesFilter.Include("fubudocs"); var assembly = Assembly.Load(AssemblyName.GetAssemblyName("FubuDocs.Docs.dll")); BottlesFilter.ShouldLoad(assembly).ShouldBeTrue(); BottlesFilter.ShouldLoad(GetType().Assembly).ShouldBeFalse(); }
private static IEnumerable <IPackageInfo> loadPackageFromDirectory(string dir, PackageManifestReader reader) { Console.WriteLine("Loading documentation from folder " + dir); var pak = reader.LoadFromFolder(dir).As <PackageInfo>(); pak.RemoveAllAssemblies(); var assemblyFiles = new FileSystem().FindFiles(dir, FileSet.Deep("*.Docs.dll", Path.GetFileName(dir) + ".dll")); foreach (var file in assemblyFiles) { var assemblyName = Path.GetFileNameWithoutExtension(file); var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.GetName().Name == assemblyName); if (assembly == null) { try { assembly = Assembly.LoadFrom(file); } catch { } } if (assembly != null && BottlesFilter.ShouldLoad(assembly)) { yield return(new AssemblyPackageInfo(assembly)); } } yield return(pak); }
public void should_load_directory_for_project() { BottlesFilter.Include("fubuvalidation"); BottlesFilter.ShouldLoad("FubuValidation.Docs").ShouldBeTrue(); BottlesFilter.ShouldLoad("SomethingElse.Docs").ShouldBeFalse(); }
public void should_load_assembly_when_no_filters_are_added() { BottlesFilter.ShouldLoad(GetType().Assembly).ShouldBeTrue(); }
public void should_load_directory_when_no_filters_are_added() { BottlesFilter.ShouldLoad("Test").ShouldBeTrue(); }