public void ParseWidthAttributeTest() { //Parse tokens MarkupParser markupParser = new MarkupParser(Init("120")); WidthAttribute parsedWidthAttribute = markupParser.ParseWidthAttribute(); //Check Id Attribute Assert.AreEqual(120, parsedWidthAttribute.GetWidth()); }
/// <summary> /// Interpret WidthAttribute /// </summary> /// <param name="attribute">WidthAttribute to interpret</param> public override void Visit(WidthAttribute attribute) { //Add height attribute Current.AddAttribute("width", attribute.GetWidth().ToString()); }