public void Parse_BoxWithParameters_ParsedWithSpecifiedValues() { var builder = new FluentZebraBuilder(); var tokens = builder.Rectangle("2", "2", "2", "W", "2").Build(); var parser = new ZebraParser(); var label = parser.Parse(tokens); Assert.AreEqual(1, label.Items.Count); var box = label.Items[0] as Box; Assert.IsNotNull(box); Assert.AreEqual(2, box.Width); Assert.AreEqual(2, box.Height); Assert.AreEqual(2, box.Thickness); Assert.AreEqual(Color.White, box.Color); Assert.AreEqual(2, box.Rounding); }
public void Parse_BoxWithoutParameters_ParsedWithDefaultValues() { var builder = new FluentZebraBuilder(); var tokens = builder.Rectangle().Build(); var parser = new ZebraParser(); var label = parser.Parse(tokens); Assert.AreEqual(1, label.Items.Count); var box = label.Items[0] as Box; Assert.IsNotNull(box); Assert.AreEqual(box.Point.X, 0); Assert.AreEqual(box.Point.Y, 0); Assert.AreEqual(1, box.Width); Assert.AreEqual(1, box.Height); Assert.AreEqual(1, box.Thickness); Assert.AreEqual(Color.Black, box.Color); Assert.AreEqual(0, box.Rounding); }