public void Setup()
        {
            var encodingProvider = new DefaultFileEncodingProvider();
            var assemblyResourceFilePathProvider = new AssemblyResourceFilePathProvider();
            var sourceAssembly = typeof(WebServerDeploymentResouceInfo).Assembly;
            var filesystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);

            this.assemblyFileResourceProvider = new AssemblyFileResourceProvider(sourceAssembly, assemblyResourceFilePathProvider);
            this.deploymentScriptResourceDownloader = new DeploymentScriptResourceDownloader(this.assemblyFileResourceProvider, filesystemAccessor);
        }
        public void Setup()
        {
            this.applicationInformation = ApplicationInformationProvider.GetApplicationInformation();
            IEncodingProvider encodingProvider = new DefaultFileEncodingProvider();
            IFilesystemAccessor filesystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);
            IPackageServerFactory packageServerFactory = new PackageServerFactory();
            IPublishConfigurationFactory publishConfigurationFactory = new PublishConfigurationFactory();
            IObjectSerializer<PublishConfiguration[]> publishConfigurationSerializer = new JSONObjectSerializer<PublishConfiguration[]>();
            IFilesystemPersistence<PublishConfiguration[]> publishConfigurationPersistence = new FilesystemPersistence<PublishConfiguration[]>(filesystemAccessor, publishConfigurationSerializer);
            this.publishConfigurationAccessor = new ConfigFilePublishConfigurationAccessor(this.applicationInformation, publishConfigurationFactory, publishConfigurationPersistence);

            this.publishingService = new PublishingService(filesystemAccessor, packageServerFactory, this.publishConfigurationAccessor);

            this.localPublishingFolder = Path.Combine(this.applicationInformation.StartupFolder, "publish-target");
            this.samplePackageFilepath = Path.Combine(this.applicationInformation.StartupFolder, "IntegrationTests", "Publishing", SamplePackageFilename);
        }
        public void Setup()
        {
            var applicationInformation = ApplicationInformationProvider.GetApplicationInformation();

            var encodingProvider = new DefaultFileEncodingProvider();
            this.fileSystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);

            this.userInterface = new Mock<IUserInterface>().Object;
            this.powerShellUserInterface = new NuDeployPowerShellUserInterface(this.userInterface);
            this.powerShellHost = new PowerShellHost(this.powerShellUserInterface, applicationInformation);

            this.powerShellSession = new PowerShellSession(this.powerShellHost, this.fileSystemAccessor);
        }
        public void Setup()
        {
            var applicationInformation = ApplicationInformationProvider.GetApplicationInformation();

            var encodingProvider = new DefaultFileEncodingProvider();
            var fileSystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);
            var objectSerializer = new JSONObjectSerializer<PackageInfo[]>();
            IFilesystemPersistence<PackageInfo[]> packageInfoFilesystemPersistence = new FilesystemPersistence<PackageInfo[]>(
                fileSystemAccessor, objectSerializer);

            this.packageConfigurationAccessor = new PackageConfigurationAccessor(applicationInformation, packageInfoFilesystemPersistence);
        }
        public void Setup()
        {
            var applicationInformation = ApplicationInformationProvider.GetApplicationInformation();

            var encodingProvider = new DefaultFileEncodingProvider();
            var sourceRepositoryConfigurationFactory = new SourceRepositoryConfigurationFactory();
            var objectSerializer = new JSONObjectSerializer<SourceRepositoryConfiguration[]>();
            var filesystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);
            var filesystemPersistence = new FilesystemPersistence<SourceRepositoryConfiguration[]>(filesystemAccessor, objectSerializer);

            this.sourceRepositoryProvider = new ConfigFileSourceRepositoryProvider(applicationInformation, sourceRepositoryConfigurationFactory, filesystemPersistence);
        }