protected override void Given(InstallationConfiguration installationConfiguration)
 {
     installationConfiguration
         .AndHttpBinding("myhost1")
         .AndHttpBinding("myhost2", "8.8.8.8")
         .AndDefaultHttpBinding();
 }
 public ConfiguredInstallationManifest(InstallationConfiguration installationConfiguration, ISiteInstaller sourceInstaller, string path, AssemblyDetails discoveredDetails)
 {
     InstallationConfiguration = installationConfiguration;
     SourceInstaller = sourceInstaller;
     Path = path;
     DiscoveredDetails = discoveredDetails;
 }
Ejemplo n.º 3
0
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            _sitePath = "c:\\mockpath";

            installationConfiguration
                .AndAutoStart()
                .AndSitePath(_sitePath);
        }
        public void ConfigureInstallation_CallsInstallOnISiteInstaller_ExistsToProvideACleanerApiToUsersWhileMaintainingCodeClarity()
        {
            var fakeInstaller = new Mock<ISiteInstaller>();
            var config = new InstallationConfiguration(string.Empty, null);

            fakeInstaller.Object.ConfigureInstallation(config);

            fakeInstaller.Verify(x=>x.Install(config));
        }
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            installationConfiguration.WithLogFile()
                .AndDirectory("c:\\mockdir")
                .AndCreateDirectoryWithElevatedPermissions();

            _directoryMock = new Mock<IDirectory>();
            _directoryMock.Setup(x => x.Exists(It.IsAny<string>())).Returns(true);
        }
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            DeleteExistingSite();
            CreateExistingSite();

            installationConfiguration
                .WithAppPool(AppPoolName)
                .AndDeleteExistingAppPool();
        }
        public void AllDirectoriesAreCreated()
        {
            var icfg = new InstallationConfiguration(null, null);
            icfg.WithDirectory("DirectoryA");
            icfg.WithDirectory("DirectoryB");

            _cfg.ConfigureInstalledSite(null, icfg);

            _directoryMock.Verify(x => x.CreateDirectory(It.IsAny<string>()), Times.Exactly(2));
        }
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            _customQueueLength = 999;
            CreateExistingSite(_customQueueLength);

            installationConfiguration
                .AndDeleteExistingAppPool()
                .AndStartOnDemand()
                .AndManagedRuntimeVersion("v2.0");
        }
        public void SetUp()
        {
            _serverManager = new Mock<IServerManager>();
            var directory = new Mock<IDirectory>();

            _serverManager.SetupGet(x => x.Sites).Returns(new ServerManager().Sites);

            var cfg = new InstallationConfiguration(null, null);
            cfg.WithSiteName("SiteDeployerIntegrationTest");

            _siteDeployer = new SiteDeployer(_serverManager.Object, cfg, directory.Object);
        }
        public void Ctor_StoresProvidedArguments()
        {
            var config = new InstallationConfiguration("path", null);
            var installer = new TestInstaller();
            const string path = "path";
            var discoveredDetails = new AssemblyDetails(path, "binary.dll", typeof (TestInstaller));

            var dto = new ConfiguredInstallationManifest(config, installer, path, discoveredDetails);

            Assert.That(dto.InstallationConfiguration, Is.EqualTo(config));
            Assert.That(dto.SourceInstaller, Is.EqualTo(installer));
            Assert.That(dto.Path, Is.EqualTo(path));
            Assert.That(dto.DiscoveredDetails, Is.EqualTo(discoveredDetails));
        }
Ejemplo n.º 11
0
        public ConfiguredInstallationManifest FindFirstAvailableInstaller()
        {
            var assembliesWithInstallers = _assemblyDiscoverer.FindAssemblies(Path) ?? new List<AssemblyDetails>();
            var firstInstaller = assembliesWithInstallers.FirstOrDefault();

            if (firstInstaller == null)
            {
                return new NoInstallationFound();
            }

            var assemblyWithSiteInstaller = _assemblyLoader.LoadFrom(firstInstaller.BinaryPath);
            var siteInstaller = assemblyWithSiteInstaller.CreateInstance(firstInstaller.InstallerType.FullName, true);
            var configuration = new InstallationConfiguration(_scanSitePath, _args);

            return new ConfiguredInstallationManifest(configuration, (ISiteInstaller)siteInstaller, _scanSitePath, firstInstaller);
        }
Ejemplo n.º 12
0
        public void SetUp()
        {
            DeleteExistingSite();

            InstallationConfiguration = new InstallationConfiguration(Environment.CurrentDirectory, null);
            InstallationConfiguration.WithSiteName(SiteName);
            InstallationConfiguration.WithAppPool(AppPoolName);

            Given(InstallationConfiguration);

            using (var manager = new ServerManagerWrapper())
            {
                When(manager);

                manager.CommitChanges();
            }
        }
Ejemplo n.º 13
0
        public SiteDeployer(IServerManager serverManager, InstallationConfiguration installationConfiguration, IDirectory directory)
        {
            _serverManager = serverManager;
            _installationConfiguration = installationConfiguration;
            _directory = directory;

            _preInstall = new PreInstallationTaskList
            {
                new DeleteExistingSite(_serverManager),
            };

            _installation = new CreateSite(_serverManager);

            _configuration = new ConfigurationTaskList
            {
                new ConfigureAppPool(_serverManager),
                new ConfigureBindings(_serverManager),
                new ConfigureLogging(_serverManager, _directory),
                new ConfigureAdditionalDirectories(_serverManager, _directory)
            };
        }
 protected override void Given(InstallationConfiguration installationConfiguration)
 {
     installationConfiguration
         .AndHttpsBinding("myhost3")
         .AndHttpsBinding("myhost4", "9.9.9.9");
 }
Ejemplo n.º 15
0
 protected virtual void Given(InstallationConfiguration installationConfiguration)
 {
 }
Ejemplo n.º 16
0
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            CreateExistingSite();

            installationConfiguration.WithSiteName("SiteOtherNameWhichShouldNotBeCreated");
        }
 public void SetUp()
 {
     _cfg = new InstallationConfiguration("", null);
 }
 protected override void Given(InstallationConfiguration installationConfiguration)
 {
 }
Ejemplo n.º 19
0
        protected override void Given(InstallationConfiguration installationConfiguration)
        {
            CreateExistingSite();

            installationConfiguration.AndDeleteExistingSite();
        }
 protected override void Given(InstallationConfiguration installationConfiguration)
 {
     DeleteExistingSite();
     _customQueueLength = 999;
     CreateExistingSite(_customQueueLength);
 }
 protected override void Given(InstallationConfiguration installationConfiguration)
 {
     _directoryMock = new Mock<IDirectory>();
     _directoryMock.Setup(x => x.Exists(It.IsAny<string>())).Returns(false);
 }