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)); }
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(); }
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); }
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); }