using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; namespace ScrewTurn.Wiki.Tests { [TestFixture] public class ReverseFormatterTests { [Test] [TestCase("text", "'''text'''")] [TestCase("text", "'''text'''")] [TestCase("text", "''text''")] [TestCase("text", "''text''")] [TestCase("text", "__text__")] [TestCase("text", "--text--")] [TestCase("

text

", "==text==")] [TestCase("

text

", "===text===")] [TestCase("

text

", "====text====")] [TestCase("

text", "=====text=====")] [TestCase("text", "text")] [TestCase("text", "text")] [TestCase("
text
", "@@text@@")] [TestCase("text", "{{'''text'''}}")] [TestCase("
text
","(((text))){br}")] [TestCase("
text
", "text{br}")] [TestCase("
  1. 1
  2. 2
","{br}# 1{br}# 2{br}{br}")] [TestCase("", "{br}* 1{br}* 2{br}{br}")] [TestCase("I'm an anchor", "[anchor|#init]I'm an anchor")] [TestCase("This recall an anchor", "[#init|This recall an anchor]")] [TestCase("BIG TITLE","[^google.com|BIG TITLE]")] [TestCase("try to esc tag","try to esc tag")] public void PlainTest(string input, string output) { Assert.AreEqual(output, ReverseFormatter.ReverseFormat(input)); } } }