public void HyphenationOptions()
{
Document doc = new Document();
DocumentHelper.InsertNewRun(doc, "poqwjopiqewhpefobiewfbiowefob ewpj weiweohiewobew ipo efoiewfihpewfpojpief pijewfoihewfihoewfphiewfpioihewfoihweoihewfpj", 0);
doc.HyphenationOptions.AutoHyphenation = true;
doc.HyphenationOptions.ConsecutiveHyphenLimit = 2;
doc.HyphenationOptions.HyphenationZone = 720; // 0.5 inch
doc.HyphenationOptions.HyphenateCaps = true;
MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, SaveFormat.Docx);
Assert.AreEqual(true, doc.HyphenationOptions.AutoHyphenation);
Assert.AreEqual(2, doc.HyphenationOptions.ConsecutiveHyphenLimit);
Assert.AreEqual(720, doc.HyphenationOptions.HyphenationZone);
Assert.AreEqual(true, doc.HyphenationOptions.HyphenateCaps);
doc.Save(MyDir + "HyphenationOptions.docx");
}