Beispiel #1
0
        private void TestWebViewRemoveChildConversions(string original, string expected)
        {
            var fs = new TestFileSystem
            {
                FileExistsResponse = true,
                FileText           = original,
            };

#if DEBUG
            var sut = new XamlConverter(fs);

            var(success, _) = sut.ConvertFile("somefile.xaml", new[] { new WebViewRemoveChildAnalyzer() });

            Assert.AreEqual(true, success);
            Assert.AreEqual(expected, fs.WrittenFileText);
#endif
        }
Beispiel #2
0
        private void TestRenameWebViewWithCustomXmlnsAnalyzerConversions(string original, string expected)
        {
            var fs = new TestFileSystem
            {
                FileExistsResponse = true,
                FileText           = original,
            };

#if DEBUG
            var sut = new XamlConverter(fs);

            var(success, details) = sut.ConvertFile("somefile.xaml", new[] { new RenameWebViewWithCustomXmlnsAnalyzer() });

            Assert.AreEqual(true, success);
            Assert.IsTrue(details.Count() > 3);
            Assert.AreEqual(expected, fs.WrittenFileText);
#endif
        }