protected void given_assembly_of <T>(string fileName) { SourceAssemblyFile = Dir.GetFile("old.dll"); using (var destination = SourceAssemblyFile.OpenWrite()) using (var source = LocalFileSystem.Instance.GetFile(typeof(T).Assembly.Location).OpenRead()) source.CopyTo(destination); AssemblyFile = Dir.GetFile(fileName); }
protected void given_descriptor(params string[] line) { var descriptorText = line.JoinString("\r\n"); descriptor = new PackageDescriptorReader().Read(descriptorText.ToUTF8Stream()); root.GetFile("test.wrapdesc").WriteString(descriptorText); }
protected void given_folder_repository_with_module(string packageName) { FileSystem = LocalFileSystem.Instance; RepositoryPath = FileSystem.CreateTempDirectory(); Packager.NewWithDescriptor( RepositoryPath.GetFile(packageName + "-1.0.0.wrap"), packageName, "1.0.0", "depends: nhibernate-core = 2.1" ); Repository = new FolderRepository(RepositoryPath); }
protected void given_package_file(string name, string version) { Packager.NewWithDescriptor(repository_directory.GetFile(PackageNameUtility.PackageFileName(name, version)), name, version); }
protected void given_project_descriptor(string name, string descriptor = null) { project_directory.GetFile(name).WriteString(descriptor ?? string.Empty); }
public override void given_descriptor(params string[] content) { _packageDirectory.GetFile("package.wrapdesc").WriteString(content.JoinString("\r\n")); }
protected void given_solution_file(string fileName, string content) { SlnFile = SlnDir.GetFile(fileName); SlnFile.WriteString(content); }
protected void given_folder_repository_with_module() { FileSystem = LocalFileSystem.Instance; RepositoryPath = FileSystem.CreateTempDirectory(); PackageBuilder.New( RepositoryPath.GetFile("test-module-1.0.0.wrap"), "test-module", "1.0.0", "depends: nhibernate-core = 2.1" ); Repository = new FolderRepository(RepositoryPath, false); }