Inheritance: XmlBrick, IGLideToBrick
        public override bool Equals(System.Object obj)
        {
            XmlGlideToBrick b = obj as XmlGlideToBrick;

            if ((object)b == null)
            {
                return(false);
            }

            return(this.Equals(b) && this.XDestination.Equals(b.XDestination) &&
                   this.YDestination.Equals(b.YDestination) && this.DurationInSeconds.Equals(b.DurationInSeconds));
        }
        public void XmlGlideToBrickTest()
        {
            TextReader sr = new StringReader("<brick type=\"GlideToBrick\"> <formulaList> <formula category=\"Y_DESTINATION\"> <leftChild> <type>USER_VARIABLE</type> <value>Distance factor</value> </leftChild> <rightChild> <type>SENSOR</type> <value>Y_INCLINATION</value> </rightChild> <type>OPERATOR</type> <value>MULT</value> </formula> <formula category=\"X_DESTINATION\"> <leftChild> <type>USER_VARIABLE</type> <value>Distance factor</value> </leftChild> <rightChild> <type>SENSOR</type> <value>X_INCLINATION</value> </rightChild> <type>OPERATOR</type> <value>MULT</value> </formula> <formula category=\"DURATION_IN_SECONDS\"> <type>NUMBER</type> <value>1</value> </formula> </formulaList> </brick>");
            var xRoot = XElement.Load(sr);

            var testObject = new XmlGlideToBrick(xRoot);

            var referenceObject = new XmlGlideToBrick()
            {
                DurationInSeconds = new XmlFormula(xRoot, XmlConstants.DurationInSeconds),
                XDestination = new XmlFormula(xRoot, XmlConstants.XDestination),
                YDestination = new XmlFormula(xRoot, XmlConstants.YDestination),
            };

            Assert.AreEqual(referenceObject, testObject);
        }
 public bool Equals(XmlGlideToBrick b)
 {
     return(this.Equals((XmlBrick)b) && this.XDestination.Equals(b.XDestination) &&
            this.YDestination.Equals(b.YDestination) && this.DurationInSeconds.Equals(b.DurationInSeconds));
 }
 public bool Equals(XmlGlideToBrick b)
 {
     return this.Equals((XmlBrick)b) && this.XDestination.Equals(b.XDestination)
         && this.YDestination.Equals(b.YDestination) && this.DurationInSeconds.Equals(b.DurationInSeconds);
 }