public void AddHeadwordWithPicturePresentTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("hornbill.xhtml");
     var input = new DictionaryForMIDsInput(projInfo);
     var sense = input.SelectNodes("//*[@class = 'entry']//*[@id]")[0];
     var rec = new DictionaryForMIDsRec();
     rec.AddHeadword(sense);
     Assert.AreEqual("dagol  ", rec.Rec);
 }
 public void AddAfterTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("sena3-ipa.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("sena3-ipa.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec { CssClass = CssClass, Styles = ContentStyles };
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("//*[@class = 'xsensenumber']")[0];
     rec.AddAfter(node);
     Assert.AreEqual(") ", rec.Rec);
 }
 public void AddStyleTagTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("sena3-imba.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("sena3-imba.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec {CssClass = CssClass, Styles = ContentStyles};
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("//*[@class = 'partofspeech']//text()")[0];
     rec.AddStyleTag(node);
     Assert.AreEqual(2, ContentStyles.NumStyles);
 }
 public void AddStyleTagLangTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("wasp.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("wasp.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec { CssClass = CssClass, Styles = ContentStyles };
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("(//*[@class='xitem'])/*")[1];
     rec.AddStyleTag(node);
     Assert.AreEqual(2, ContentStyles.NumStyles);
     Assert.AreEqual("153,51,102", rec.Styles.FontColor(2));
 }
 public void AddBeforeSenseTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("hornbill.xhtml");
     var input = new DictionaryForMIDsInput(projInfo);
     var sense = input.SelectNodes("//*[@class = 'entry']//*[@id]")[0];
     var rec = new DictionaryForMIDsRec();
     rec.AddBeforeSense(sense);
     Assert.AreEqual(@"{{\[sample \] ", rec.Rec);
 }
 public void AddReversalTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("sena3-imba.xhtml");
     var input = new DictionaryForMIDsInput(projInfo);
     var sense = input.SelectNodes("//*[@class = 'entry']/xhtml:div")[0];
     var rec = new DictionaryForMIDsRec();
     rec.AddReversal(sense, "definition");
     Assert.AreEqual("\tcantar", rec.Rec);
 }