public void RemoveVirtualDirectory_ThrowsWhenApplicationDoesNotExist() { var website = WebAdministrationFactory.CreateWebsite(); var sut = new WebsiteConfigurer(website); Assert.Throws<InstallationException>(() => { sut.RemoveVirtualDirectory("somemissingapplication"); }); }
public void RemoveVirtualDirectory_RemovesVirtualDirectoryFromSite() { var website = WebAdministrationFactory.CreateWebsite(); website.Application().VirtualDirectories.Add("/SomeAlias", @"C:\"); var sut = new WebsiteConfigurer(website); sut.RemoveVirtualDirectory("SomeAlias"); Assert.Equal(0, website.Application().VirtualDirectories.Count(x => x.Path.Equals("/SomeAlias"))); }