public bool Equals(XmlRepeatBrick b) { return this.Equals((XmlBrick)b) && this.TimesToRepeat.Equals(b.TimesToRepeat); }
public void XmlRepeatBrickTest() { TextReader sr = new StringReader("<brick type=\"RepeatBrick\"><formulaList><formula category=\"TIMES_TO_REPEAT\"><type>NUMBER</type><value>50</value></formula></formulaList></brick>"); var xRoot = XElement.Load(sr); var testObject = new XmlRepeatBrick(xRoot); var referenceObject = new XmlRepeatBrick() { TimesToRepeat = new XmlFormula(xRoot, XmlConstants.TimesToRepeat), }; Assert.AreEqual(referenceObject, testObject); }