Esempio n. 1
0
        private static void DoInsertAfterTest(string s, string expected, Action <SyntaxTree, DocumentScript> doInsertion)
        {
            var script = new DocumentScript(new StringBuilderDocument(s), FormattingOptionsFactory.CreateEmpty(), new TextEditorOptions());

            doInsertion(new CSharpParser().Parse(s), script);
            Assert.AreEqual(expected, script.CurrentDocument.Text);
        }
Esempio n. 2
0
        public void TestLoadFullFromSimpleXml()
        {
            var actual   = CSharpFormattingProperties.GetOptions(Path.Combine(TestFolder, "Simple.xml"));
            var expected = FormattingOptionsFactory.CreateSharpDevelop();

            CheckOptions(expected, actual, 0);

            expected = FormattingOptionsFactory.CreateEmpty();
            CheckOptions(expected, actual, 82);
        }