public void ConstructorBadStyle() { Type etype = Type.GetType ("Scielo.PDF2Text.Normalizer"); int count = 0; foreach (RawDocument raw in raw_docs) { Normalizer norm = new Normalizer (raw.GetText (), "atn"); Assert.IsInstanceOfType (etype, norm, "CBS" + count); count++; } }
public void ApplyRule() { XmlNodeList globalNodes = document.SelectNodes ("/def:style/def:global/def:rule", manager); Rule[] rules = new Rule [globalNodes.Count]; int count = 0; foreach (XmlNode node in globalNodes) { rules [count] = new Rule (node, manager, BlockType.GLOBAL); count++; } string filepath = Path.Combine (path, "normalizer.txt"); Normalizer norm = new Normalizer (Test.ReadFile (filepath), rules); norm.ApplyRule (rules [0]); norm.ApplyRule (rules [1]); filepath = Path.Combine (path, "normalizer-step1.txt"); Assert.AreEqual (Test.ReadFile (filepath), norm.Text, "AR"); }