public void OnPhysicalPath_ThrowsIfPathDoesNotExist()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut = new ApplicationConfigurer(application);

            Assert.Throws<DirectoryNotFoundException>(() => sut.OnPhysicalPath("C:\\mySite282829"));
        }
        public void OnPhysicalPath_ThrowsIfPathDoesNotExist()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut         = new ApplicationConfigurer(application);

            Assert.Throws <DirectoryNotFoundException>(() => sut.OnPhysicalPath("C:\\mySite282829"));
        }
        public void UseApplicationPool_SetsTheApplicationPoolName()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut = new ApplicationConfigurer(application);

            sut.UseApplicationPool("TestApplicationPool");

            Assert.Equal("TestApplicationPool", application.ApplicationPoolName);
        }
        public void UseAlias_WithNoForwardSlashSetsThePathCorrectly()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut = new ApplicationConfigurer(application);

            sut.UseAlias("TestAlias");

            Assert.Equal("/TestAlias", application.Path);
        }
        public void OnPhysicalPath_SetsTheApplicationsVirtualDirectoryPhysicalPath()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut = new ApplicationConfigurer(application);

            sut.OnPhysicalPath(@"C:\");

            Assert.Equal(@"C:\", application.VirtualDirectory().PhysicalPath);
        }
        public void UseApplicationPool_SetsTheApplicationPoolName()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut         = new ApplicationConfigurer(application);

            sut.UseApplicationPool("TestApplicationPool");

            Assert.Equal("TestApplicationPool", application.ApplicationPoolName);
        }
        public void OnPhysicalPath_SetsTheApplicationsVirtualDirectoryPhysicalPath()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut         = new ApplicationConfigurer(application);

            sut.OnPhysicalPath(@"C:\");

            Assert.Equal(@"C:\", application.VirtualDirectory().PhysicalPath);
        }
        public void UseAlias_WithForwardSlashSetsThePathCorrectly()
        {
            var application = WebAdministrationFactory.CreateApplication();
            var sut         = new ApplicationConfigurer(application);

            sut.UseAlias("/TestAlias");

            Assert.Equal("/TestAlias", application.Path);
        }
        public void Configure_GivesDirectAccessToTheWebsite()
        {
            var expected = WebAdministrationFactory.CreateApplication();
            var sut = new ApplicationConfigurer(expected);
            var actual = default(Application);

            sut.Configure(x => actual = x);

            Assert.Equal(expected, actual);
        }
        public void Configure_GivesDirectAccessToTheWebsite()
        {
            var expected = WebAdministrationFactory.CreateApplication();
            var sut      = new ApplicationConfigurer(expected);
            var actual   = default(Application);

            sut.Configure(x => actual = x);

            Assert.Equal(expected, actual);
        }