コード例 #1
0
        public void AddVirtualDirectory_AddsANewVirtualDirectoryToTheSite()
        {
            var website = WebAdministrationFactory.CreateWebsite();
            var sut = new WebsiteConfigurer(website);

            sut.AddVirtualDirectory((application) => { });

            var actual = website.Applications.Count;

            Assert.Equal(1, actual);
        }
コード例 #2
0
        public void AddVirtualDirectory_PassesNewVirtualDirectoryToConfigurer()
        {
            var website = WebAdministrationFactory.CreateWebsite();
            var sut = new WebsiteConfigurer(website);
            var actual = false;

            Action<IVirtualDirectoryConfigurer> action = (configurer) =>
            {
                actual = configurer != null;
            };

            sut.AddVirtualDirectory(action);

            Assert.True(actual);
        }