using Core.Printing; namespace Tests.Printing; [TestFixture] public class PrintTokenMap_Tests { [Test] public void Build_BuiltInWinsOverImportedSameName() { var map = PrintTokenMap.Build( new Dictionary { ["Grade"] = "imported" }, new Dictionary { ["Grade"] = "9" }, null); Assert.That(map["Grade"], Is.EqualTo("9")); } [Test] public void Build_BuiltInRankTokenWinsOverImportedSameName() { var map = PrintTokenMap.Build( new Dictionary { ["Rank1"] = "imported" }, new Dictionary { ["Rank1"] = "Coding" }, null); Assert.That(map["Rank1"], Is.EqualTo("Coding")); } [Test] public void Build_IncludesAllImportedCatalogKeys() { var imported = new Dictionary { ["Interview Time"] = "3:20-3:35", ["Application"] = null }; var map = PrintTokenMap.Build(imported, null, null); Assert.That(map.ContainsKey("Interview Time"), Is.True); Assert.That(map["Interview Time"], Is.EqualTo("3:20-3:35")); Assert.That(map.ContainsKey("Application"), Is.True); Assert.That(map["Application"], Is.EqualTo(string.Empty)); } [Test] public void Escape_MasksMarkdownAndHtml() { var escaped = PrintTokenMap.Escape("A *B*