public void TestCorrectOrderInOptRecord() { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.CreateSheet() as HSSFSheet; HSSFPatriarch patriarch = sheet.CreateDrawingPatriarch() as HSSFPatriarch; HSSFTextbox textbox = patriarch.CreateTextbox(new HSSFClientAnchor()) as HSSFTextbox; EscherOptRecord opt = HSSFTestHelper.GetOptRecord(textbox); String opt1Str = opt.ToXml(); textbox.FillColor = textbox.FillColor; EscherContainerRecord Container = HSSFTestHelper.GetEscherContainer(textbox); EscherOptRecord optRecord = Container.GetChildById(EscherOptRecord.RECORD_ID) as EscherOptRecord; Assert.AreEqual(opt1Str, optRecord.ToXml()); textbox.LineStyle = textbox.LineStyle; Assert.AreEqual(opt1Str, optRecord.ToXml()); textbox.LineWidth = textbox.LineWidth; Assert.AreEqual(opt1Str, optRecord.ToXml()); textbox.LineStyleColor = textbox.LineStyleColor; Assert.AreEqual(opt1Str, optRecord.ToXml()); wb.Close(); }