Inheritance: XmlBrick, IChangeXByBrick
Exemple #1
0
        public override bool Equals(System.Object obj)
        {
            XmlChangeXByBrick b = obj as XmlChangeXByBrick;

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

            return(this.Equals(b) && this.XMovement.Equals(b.XMovement));
        }
         public void XmlChangeXByBrickTest()
         {
             TextReader sr = new StringReader("<brick type=\"ChangeXByNBrick\"> <formulaList> <formula category=\"X_POSITION_CHANGE\"> <type>USER_VARIABLE</type> <value>x speed</value> </formula> </formulaList> </brick>");
             var xRoot = XElement.Load(sr);

             var testObject = new XmlChangeXByBrick(xRoot);

             var referenceObject = new XmlChangeXByBrick()
             {
                 XMovement = new XmlFormula(xRoot, XmlConstants.XPositionChange),
             };

             Assert.AreEqual(referenceObject, testObject);
         }
Exemple #3
0
 public bool Equals(XmlChangeXByBrick b)
 {
     return(this.Equals((XmlBrick)b) && this.XMovement.Equals(b.XMovement));
 }
 public bool Equals(XmlChangeXByBrick b)
 {
     return this.Equals((XmlBrick)b) && this.XMovement.Equals(b.XMovement);
 }