Example #1
0
        public void AddRendering_NoOtherRenderings_AddedRenderingIsDefault()
        {
            m_renderings["GreekWord"] = new string[0];
            var kt = new KeyTerm(new KeyTermMatchSurrogate("diversion", "GreekWord"));

            kt.AddRendering("wunkyboo");
            Assert.AreEqual(1, kt.Renderings.Count());
            Assert.AreEqual("wunkyboo", kt.BestRendering);
            Assert.AreEqual("wunkyboo", kt.Translation);
            kt.LoadRenderings();
            Assert.AreEqual("wunkyboo", kt.BestRendering);
            Assert.AreEqual("wunkyboo", kt.Translation);
            kt.DeleteRendering("wunkyboo");
            Assert.AreEqual(string.Empty, kt.BestRendering);
            Assert.AreEqual(string.Empty, kt.Translation);
        }
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Handles the Click event of the Refresh Renderings from Paratext menu item.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 private void mnuRefreshRenderingsH_Click(object sender, EventArgs e)
 {
     m_term.LoadRenderings();
     PopulateRenderings();
 }