public void can_read_the_package_manifest_from_the_assembly_when_it_is_an_embedded_resource() { var assembly = typeof(AssemblyPackageMarker).Assembly; var manifest = AssemblyPackageInfo.DetermineManifest(assembly); manifest.Name.ShouldEqual("FakeProject"); manifest.Role.ShouldEqual("module"); }
public void by_default_the_package_name_of_an_assembly_package_is_just_the_assembly_name() { var theAssembly = GetType().Assembly; var package = new AssemblyPackageInfo(theAssembly); package.Name.ShouldEqual(theAssembly.GetName().Name); }
public void push_bottle() { var bottle = new AssemblyPackageInfo(Assembly.GetExecutingAssembly()); var graph = new ConfigGraph(); graph.Push(bottle); graph.CurrentProvenance.ShouldHaveTheSameElementsAs(new BottleProvenance(bottle)); }
public static IEnumerable <IPackageInfo> LoadPackages(List <string> list) { return(FindAssemblies(list) .Select(assem => { Console.WriteLine("Exploding content from " + assem.GetName()); var pak = new AssemblyPackageInfo(assem); pak.ForFolder(BottleFiles.WebContentFolder, x => { // nothing, just forcing it to do something }); return pak; })); }
public void push_extension() { var bottle = new AssemblyPackageInfo(Assembly.GetExecutingAssembly()); var graph = new ConfigGraph(); graph.Push(bottle); var extension = new FakeRegistryExtension(); graph.Push(extension); graph.CurrentProvenance.ShouldHaveTheSameElementsAs(new BottleProvenance(bottle), new FubuRegistryExtensionProvenance(extension)); }
public static bool IsSpecPackage(PackageAssets package) { if (package.PackageName == "application") { return(false); } if (package.PackageName == AssemblyPackageInfo.CreateFor(typeof(SpecificationGraph).Assembly).Name) { return(false); } return(true); }
public void assembly_package_adds_an_assembly_target_for_the_assembly() { // This behavior is crucial. If you add the assembly the wrong way, // Bottles tries to copy the assembly to the application bin directory var theAssembly = GetType().Assembly; var package = new AssemblyPackageInfo(theAssembly); var registration = MockRepository.GenerateMock <IAssemblyRegistration>(); package.LoadAssemblies(registration); registration.AssertWasCalled(x => x.Use(theAssembly)); }
public IEnumerable <IPackageInfo> Load(IPackageLog log) { var packages = new List <IPackageInfo>(); //issue?? var includes = _fileSystem.LoadFromFile <PackageManifest>(_applicationFolder, PackageManifest.FILE); packages.AddRange(includes.LinkedFolders.Select(f => LoadFromFolder(Path.Combine(_applicationFolder, f)))); packages.AddRange(includes.Assemblies.Select(assemblyName => { var assembly = Assembly.Load(assemblyName); return(AssemblyPackageInfo.CreateFor(assembly)); })); return(packages); }
public void fill_action_puts_the_provenance_in_the_right_order() { var bottle = new AssemblyPackageInfo(Assembly.GetExecutingAssembly()); var graph = new ConfigGraph(); graph.Push(bottle); var extension = new FakeRegistryExtension(); graph.Push(extension); var policy = new UniquePolicy(); graph.Add(policy, ConfigurationType.Policy); graph.LogsFor(ConfigurationType.Policy).Single() .ProvenanceChain.ShouldHaveTheSameElementsAs(new BottleProvenance(bottle), new FubuRegistryExtensionProvenance(extension)); }
public void SetUp() { thePackage = AssemblyPackageInfo.CreateFor(typeof(AssemblyPackageMarker).Assembly); }
public void SetUp() { assembly = Assembly.GetExecutingAssembly(); package = AssemblyPackageInfo.CreateFor(assembly); }