Esempio n. 1
0
        public TestSiteServer(string physicalSitePath, TestSiteServerOptions options)
        {
            _physicalSitePath = physicalSitePath;

            options.FinalizeAndValidate();
            _options             = options;
            _applicationHostPath = Path.GetTempFileName();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TestSiteManager" /> class.
        /// </summary>
        /// <param name="deployerOptions">Options for the deployment (MsBuild deploy/publish).</param>
        /// <param name="serverOptions">Options for the server (IIS Express).</param>
        public TestSiteManager(TestSiteDeployerOptions deployerOptions, TestSiteServerOptions serverOptions = null)
        {
            serverOptions = serverOptions ?? new TestSiteServerOptions();

            deployerOptions.FinalizeAndValidate();
            serverOptions.FinalizeAndValidate();

            _deployer = new TestSiteDeployer(deployerOptions);
            _server   = new TestSiteServer(_deployer, serverOptions);
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestSiteManager" /> class.
 /// </summary>
 /// <param name="projectName">Name of the web project. This is assumed to be
 /// both the project folder name, and also the <c>.csproj</c> name (without the .csproj extension).
 /// If the project folder name and .csproj name are different, use the
 /// <see cref="TestSiteManager(TestSiteDeployerOptions,TestSiteServerOptions)" /> constructor.
 /// </param>
 /// <param name="serverOptions">Options for the server (IIS Express).</param>
 public TestSiteManager(string projectName, TestSiteServerOptions serverOptions = null)
     : this(new TestSiteDeployerOptions(projectName), serverOptions)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestSiteManager" /> class.
 /// </summary>
 /// <param name="deployerOptions">Options for the deployment (MsBuild deploy/publish).</param>
 /// <param name="serverOptions">Options for the server (IIS Express).</param>
 public TestSiteManager(TestSiteDeployerOptions deployerOptions, TestSiteServerOptions serverOptions = null)
 {
     _deployer = new TestSiteDeployer(deployerOptions);
     _server   = new TestSiteServer(_deployer, serverOptions ?? new TestSiteServerOptions());
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new test site server that hosts the application deployed by the given <paramref name="deployer"/> using
 /// options defined in <paramref name="options"/>.
 /// </summary>
 public TestSiteServer(TestSiteDeployer deployer, TestSiteServerOptions options) : this(deployer.TestSitePath, options)
 {
 }