public ICmPossibility MakeTemplate(out List <ICmPossibility> allCols) { // The exact organization of columns is not of great // importance for the current tests (still less the names), but we do want there // to be a hierarchy, since that is a common problem, and naming them conventionally // may make debugging easier. Currently this is the same set of columns as // m_logic.CreateDefaultColumns, but we make it explicit here so most of the test // code is unaffected by changes to the default. var doc = new XmlDocument(); doc.LoadXml( "<template name=\"default\">" + "<column name=\"prenuclear\">" + "<column name=\"prenuc1\"/>" + "<column name=\"prenuc2\"/>" + "</column>" + "<column name=\"nucleus\">" + "<column name=\"Subject\"/>" + "<column name=\"verb\"/>" + "<column name=\"object\"/>" + "</column>" + "<column name=\"postnuc\"/>" + "</template>"); m_template = Cache.LangProject.CreateChartTemplate(doc.DocumentElement); m_allColumns = Logic.AllColumns(m_template); allCols = m_allColumns; return(m_template); }
public void AllColumns() { List<int> cols = m_logic.AllColumns(m_template); Assert.AreEqual(6, cols.Count); Assert.AreEqual(m_template.SubPossibilitiesOS[0].SubPossibilitiesOS[0].Hvo, cols[0]); Assert.AreEqual(m_template.SubPossibilitiesOS[2].Hvo, cols[5]); }