public void Stroke_DashTest() { StrokeStyle target = new StrokeStyle(); //Default PDFDash expected = PDFDash.None; PDFDash actual = target.Dash; Assert.AreEqual(expected, actual); // Set value expected = new PDFDash(new int[] { 1, 2, 3 }, 7); target.Dash = expected; actual = target.Dash; Assert.AreEqual(expected, actual); //Change Value expected = new PDFDash(new int[] { 2, 3, 4 }, 10); target.Dash = expected; actual = target.Dash; Assert.AreEqual(expected, actual); // Remove Value expected = PDFDash.None; target.RemoveDash(); actual = target.Dash; Assert.AreEqual(expected, actual); }
public void Stroke_LineStyleTest() { StrokeStyle target = new StrokeStyle(); //Default LineType expected = LineType.None; Assert.AreEqual(expected, target.LineStyle); //With color - should be solid target.Color = PDFColors.Red; expected = LineType.Solid; Assert.AreEqual(expected, target.LineStyle); //With dash - should be dashed target.Dash = new PDFDash(new int[] { 2, 3, 4 }, 10); expected = LineType.Dash; Assert.AreEqual(expected, target.LineStyle); //Set value (should override the dash and color options) expected = LineType.Solid; LineType actual; target.LineStyle = expected; actual = target.LineStyle; Assert.AreEqual(expected, actual); // Change Value expected = LineType.None; target.LineStyle = expected; actual = target.LineStyle; Assert.AreEqual(expected, actual); //Remove value expected = LineType.None; target.RemoveLineStyle(); target.RemoveDash(); target.RemoveColor(); actual = target.LineStyle; Assert.AreEqual(expected, actual); }