예제 #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_Create_Delete_AppPool()
        {
            // Arrange
            var settings = CakeHelper.GetAppPoolSettings("Bart");

            // Create
            CakeHelper.CreateApplicationPoolManager().Create(settings);
            CakeHelper.GetPool(settings.Name).ShouldNotBeNull();

            // Delete
            CakeHelper.DeletePool(settings.Name);
            CakeHelper.GetPool(settings.Name).ShouldBeNull();
        }
예제 #3
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);
        }
예제 #4
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);
        }