コード例 #1
0
        public void Should_Delete_AppPool()
        {
            // Arrange
            var settings = CakeHelper.GetAppPoolSettings();

            CakeHelper.CreatePool(settings);

            // Act
            CakeHelper.CreateApplicationPoolManager().Delete(settings.Name);

            // Assert
            Assert.Null(CakeHelper.GetPool(settings.Name));
        }
コード例 #2
0
        public void Should_Stop_AppPool()
        {
            // Arrange
            var settings = CakeHelper.GetAppPoolSettings();

            CakeHelper.CreatePool(settings);
            CakeHelper.StartPool(settings.Name);

            // Act
            CakeHelper.CreateApplicationPoolManager().Stop(settings.Name);

            // Assert
            ApplicationPool pool = CakeHelper.GetPool(settings.Name);

            Assert.NotNull(pool);
            Assert.True(pool.State == ObjectState.Stopped);
        }
コード例 #3
0
        public void Should_Stop_AppPool()
        {
            // Arrange
            var settings = CakeHelper.GetAppPoolSettings("Marg");

            CakeHelper.CreatePool(settings);
            CakeHelper.StartPool(settings.Name);

            // Act
            CakeHelper.CreateApplicationPoolManager().Stop(settings.Name);

            // Assert
            ApplicationPool pool = CakeHelper.GetPool(settings.Name);

            pool.ShouldNotBeNull();
            pool.State.ShouldBe(ObjectState.Stopped);

            CakeHelper.DeletePool(settings.Name);
        }