LoadAssembliesFromPackage() public method

public LoadAssembliesFromPackage ( IPackageInfo packageInfo ) : void
packageInfo IPackageInfo
return void
        public void load_a_package_info_from_a_manifest_file_when_given_the_folder()
        {
            // the reader is rooted at the folder location of the main app
            var package = reader.LoadFromFolder("../../../TestPackage1".ToFullPath());

            var assemblyLoader = new AssemblyLoader(new BottlingDiagnostics(new LoggingSession()));
            assemblyLoader.AssemblyFileLoader = file => Assembly.Load(Path.GetFileNameWithoutExtension(file));
            assemblyLoader.LoadAssembliesFromPackage(package);

            var loadedAssemblies = assemblyLoader.Assemblies.ToArray();
            loadedAssemblies.ShouldHaveCount(1);
            loadedAssemblies[0].GetName().Name.ShouldEqual("TestPackage1");
        }
        public void load_packages_by_assembly()
        {
            var includes = new PackageManifest();

            new FileSystem().PersistToFile(includes, theApplicationDirectory, PackageManifest.FILE);

            var links = new LinkManifest();
            links.AddLink("../TestPackage1");

            new FileSystem().PersistToFile(links, theApplicationDirectory, LinkManifest.FILE);

            var assemblyLoader = new AssemblyLoader(new BottlingDiagnostics(new LoggingSession()));
            assemblyLoader.AssemblyFileLoader = file => Assembly.Load(Path.GetFileNameWithoutExtension(file));

            var package = linkedFolderReader.Load(new PackageLog()).Single();
            assemblyLoader.LoadAssembliesFromPackage(package);

            assemblyLoader
                .Assemblies
                .Single()
                .GetName()
                .Name
                .ShouldEqual("TestPackage1");
        }