public void TestMarkdownParser() { Assert.AreEqual("<h2>Lost In Space</h2>", Challenge02.MarkdownParser("## Lost In Space ")); Assert.AreEqual("<h2>smaller header</h2>", Challenge02.MarkdownParser("## smaller header")); Assert.AreEqual("<h6>smaller header</h6>", Challenge02.MarkdownParser("###### smaller header")); Assert.AreEqual("#Invalid", Challenge02.MarkdownParser("#Invalid")); Assert.AreEqual(" #Invalid", Challenge02.MarkdownParser(" #Invalid")); Assert.AreEqual("<h1>Invalid</h1>", Challenge02.MarkdownParser("# Invalid")); Assert.AreEqual("<h3>### smaller header</h3>", Challenge02.MarkdownParser("### ### smaller header")); Assert.AreEqual("####### more than h6", Challenge02.MarkdownParser("####### more than h6")); Assert.AreEqual("<h3>### smaller header " + "### one copy" + "### two copy" + "### three copy" + "### four copy" + "### five copy" + "### sixth copy" + "### seventh copy" + "### eighth copy" + "</h3>", Challenge02.MarkdownParser("### ### smaller header " + "### one copy" + "### two copy" + "### three copy" + "### four copy" + "### five copy" + "### sixth copy" + "### seventh copy" + "### eighth copy")); }
public void ExpectedTest() { Challenge02 c = new Challenge02(); string output = c.DoChallenge02("1c0111001f010100061a024b53535009181c", "686974207468652062756c6c277320657965"); Assert.AreEqual("746865206b696420646f6e277420706c6179", output.ToLower()); }
public static void Test() { string input = "Blanca,Carlos,David,Antonio,Ernesto\n" + "17945,10091,10088,3907,10132\n" + "2,12,13,48,11"; string output = "Antonio,Blanca,Carlos,David,Ernesto\n" + "3907,17945,10091,10088,10132\n" + "48,2,12,13,11"; Assert.AreEqual(Challenge02.SortCsvColumns(input), output); }