public IWebsiteConfigurer AddVirtualDirectory(Action<IVirtualDirectoryConfigurer> virtualDirectory)
 {
     return Configure(site =>
     {
         var configurer = new VirtualDirectoryConfigurer(site.Application().VirtualDirectories.CreateDefaultVirtualDirectory());
         virtualDirectory(configurer);
     });
 }
        public void OnPhysicalPath_SetsThePhysicalPath()
        {
            var virtualDirectory = WebAdministrationFactory.CreateVirtualDirectory();
            var sut = new VirtualDirectoryConfigurer(virtualDirectory);

            sut.OnPhysicalPath("X:\\mySite");

            Assert.Equal("X:\\mySite", virtualDirectory.PhysicalPath);
        }
        public void UseAlias_SetsThePathWhenTheAliasHasNoForwardSlash()
        {
            var virtualDirectory = WebAdministrationFactory.CreateVirtualDirectory();
            var sut = new VirtualDirectoryConfigurer(virtualDirectory);

            sut.UseAlias("mySite");

            Assert.Equal("/mySite", virtualDirectory.Path);
        }