public void StretchImagefitSize()
{
Document doc =
DocumentHelper.CreateTemplateDocumentWithDrawObjects("<<image [src.ImageStream] -fitSize>>",
ShapeType.TextBox);
ImageTestClass imageStream = new ImageTestBuilder()
.WithImageStream(new FileStream(mImage, FileMode.Open, FileAccess.Read)).Build();
BuildReport(doc, imageStream, "src", ReportBuildOptions.None);
doc = DocumentHelper.SaveOpen(doc);
NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
foreach (Shape shape in shapes.OfType <Shape>())
{
// Assert that the image is really insert in textbox
Assert.IsNotNull(shape.Fill.ImageBytes);
// Assert that height is changed and width is changed
Assert.AreNotEqual(346.35, shape.Height);
Assert.AreNotEqual(431.5, shape.Width);
}
}