public void testParsingWithChineseText() { org.openehr.am.archetype.ontology.ArchetypeTerm term = archetype.getOntology().termDefinition("zh", "at0000"); Assert.IsNotNull(term, "definition in zh not found"); // "\u6982\u5ff5" is "concept" in Chinese in escaped unicode format Assert.AreEqual("\u6982\u5ff5", term.getItem("text"), "concept text wrong"); // "\u63cf\u8ff0" is "description" in Chinese in escaped unicode format Assert.AreEqual("\u63cf\u8ff0", term.getItem("description"), "concept description wrong"); }
public void testParsingWithSwedishText() { org.openehr.am.archetype.ontology.ArchetypeTerm term = archetype.getOntology().termDefinition("sv", "at0000"); Assert.IsNotNull(term, "definition in sv not found"); // "spr\u00e5k" is "language" in Swedish in escaped unicode format Assert.AreEqual("spr\u00e5k", term.getItem("text"), "concept text wrong"); // "Hj\u00e4lp" is "help" in Swedish in escaped unicode format Assert.AreEqual("Hj\u00e4lp", term.getItem("description"), "concept description wrong"); }
public void testArchetypeUncommonTerm() { string adl = System.IO.File.ReadAllText(@"..\..\..\..\java-libs\adl-parser\src\test\resources\adl-test-entry.archetype_uncommonkeys.test.adl"); se.acode.openehr.parser.ADLParser parser = new se.acode.openehr.parser.ADLParser(adl); org.openehr.am.archetype.Archetype archetype = parser.parse(); org.openehr.am.archetype.ontology.ArchetypeTerm aterm = archetype.getOntology().termDefinition("at0000"); Assert.AreEqual("another key value", aterm.getItem("anotherkey").ToString(), "key value wrong"); Assert.AreEqual("test text", aterm.getItem("text").ToString(), "key value wrong"); Assert.AreEqual("test description", aterm.getItem("description").ToString(), "key value wrong"); }