public void TestPrefix() { string f = @"../../abstract-classes-cpp.md"; string content = File.ReadAllText(f); string tag = "ms.custom"; string expected = "---\r\ntitle: \"Abstract Classes (C++) | Microsoft Docs\"\r\n"; string result = YMLMeister.GetPrefix(content, tag); int x = String.Compare(expected, result); int xx = expected.Length; int z = result.Length; //Assert.AreEqual(x, 0); Assert.AreEqual(result.Length, expected.Length); System.Diagnostics.Debug.WriteLine(result + tag); }
public void TestPrefixTagSuffix() { string f = @"../../abstract-classes3.md"; string content = File.ReadAllText(f); string tag = "ms.author"; Debug.WriteLine("-----Prefix tag suffix for ms.author-----"); string prefix = YMLMeister.GetPrefix(content, tag); string tagAndval = YMLMeister.GetTagAndValue(content, tag); string suffix = YMLMeister.GetSuffix(content, tag); StringBuilder sb = new StringBuilder(); sb.Append(prefix).Append(tagAndval).Append(suffix); Debug.Assert(sb.ToString().Length == content.Length); Debug.Write(prefix + tagAndval + suffix); Debug.WriteLine("-------------"); }