public void SerializeDrawingDocumentTest() { var drawing = new NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing(); using (StringWriter stream = new StringWriter()) { NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing_Accessor.serializer.Serialize(stream, drawing, NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing_Accessor.namespaces); string expected = @"<?xml version=""1.0"" encoding=""utf-16""?> <xdr:wsDr xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:a=""http://schemas.openxmlformats.org/drawingml/2006/main"" xmlns:xdr=""http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"" />"; //</xdr:wsDr>"; Assert.AreEqual(expected, stream.ToString()); } }
public void SerializeDrawingDocumentTest() { var drawing = new NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing(); using (StringWriter stream = new StringWriter()) { NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing_Accessor.serializer.Serialize(stream, drawing, NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing_Accessor.namespaces); string expected = @"<?xml version=""1.0"" encoding=""utf-16""?> <xdr:wsDr xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:a=""http://schemas.openxmlformats.org/drawingml/2006/main"" xmlns:xdr=""http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"" />"; //</xdr:wsDr>"; Assert.AreEqual(expected, stream.ToString()); } }