Inheritance: XmlLoopBeginBrick, IRepeatBrick
コード例 #1
0
 public bool Equals(XmlRepeatBrick b)
 {
     return this.Equals((XmlBrick)b) && this.TimesToRepeat.Equals(b.TimesToRepeat);
 }
コード例 #2
0
        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);
        }