public void Style_ColorTest() { StrokeStyle target = new StrokeStyle(); Assert.AreEqual(target.Color, PDFColors.Transparent); target.Color = PDFColors.Red; Assert.AreEqual(target.Color, PDFColors.Red); target.Color = PDFColors.Blue; Assert.AreEqual(target.Color, PDFColors.Blue); target.RemoveColor(); Assert.AreEqual(target.Color, PDFColors.Transparent); }
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); }