public void TestDisable()
        {
            SetUp();
            const string Expected = @"expected_remove.config";
            var          document = XDocument.Load(Current);

            document.Save(Expected);

            _feature.Disable();
            Assert.False(_feature.IsEnabled);
            XmlAssert.Equal(Expected, Current);
        }
Example #2
0
        public void TestDisable()
        {
            SetUp();

            const string Expected = @"expected_add.site.config";
            var          document = XDocument.Load(Current); var node = new XElement("location");

            node.SetAttributeValue("path", "WebSite1");
            document.Root?.Add(node);
            document.Save(Expected);

            _feature.Disable();
            Assert.False(_feature.IsEnabled);

            XmlAssert.Equal(Expected, Current);
            XmlAssert.Equal(Path.Combine("Website1", "original.config"), Path.Combine("Website1", "web.config"));
        }