-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathMarkdownDifferenceTests.cs
More file actions
42 lines (35 loc) · 1.02 KB
/
MarkdownDifferenceTests.cs
File metadata and controls
42 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Waher.Runtime.IO;
namespace Waher.Content.Markdown.Test
{
[TestClass]
public class MarkdownDifferenceTests
{
private static async Task Test(string FileName)
{
MarkdownSettings Settings = new();
string OldMarkdown = await Files.ReadAllTextAsync("Markdown/Diff/Old/" + FileName);
string NewMarkdown = await Files.ReadAllTextAsync("Markdown/Diff/New/" + FileName);
string DiffMarkdown = await Files.ReadAllTextAsync("Markdown/Diff/Diff/" + FileName);
string Result = await MarkdownDocument.Compare(OldMarkdown, NewMarkdown, Settings, true);
Assert.AreEqual(DiffMarkdown, Result);
}
[TestMethod]
public async Task Test_01_SimpleText()
{
await Test("Test_01_Simple.md");
}
[TestMethod]
public async Task Test_02_Paragraphs()
{
await Test("Test_02_Paragraphs.md");
}
[TestMethod]
[Ignore("Being implemented")]
public async Task Test_03_Bullets()
{
await Test("Test_03_Bullets.md");
}
}
}