public override bool Equals(System.Object obj) { XmlPlaceAtBrick b = obj as XmlPlaceAtBrick; if ((object)b == null) { return(false); } return(this.Equals(b) && this.XPosition.Equals(b.XPosition) && this.YPosition.Equals(b.YPosition)); }
public bool Equals(XmlPlaceAtBrick b) { return this.Equals((XmlBrick)b) && this.XPosition.Equals(b.XPosition) && this.YPosition.Equals(b.YPosition); }
public void XmlPlaceAtBrickTest() { TextReader sr = new StringReader("<brick type=\"PlaceAtBrick\"> <formulaList> <formula category=\"Y_POSITION\"> <rightChild> <type>NUMBER</type> <value>80</value> </rightChild> <type>OPERATOR</type> <value>MINUS</value> </formula> <formula category=\"X_POSITION\"> <rightChild> <type>NUMBER</type> <value>115</value> </rightChild> <type>OPERATOR</type> <value>MINUS</value> </formula> </formulaList> </brick>"); var xRoot = XElement.Load(sr); var testObject = new XmlPlaceAtBrick(xRoot); var referenceObject = new XmlPlaceAtBrick() { XPosition = new XmlFormula(xRoot, XmlConstants.XPosition), YPosition = new XmlFormula(xRoot, XmlConstants.YPosition), }; Assert.AreEqual(referenceObject, testObject); }
public bool Equals(XmlPlaceAtBrick b) { return(this.Equals((XmlBrick)b) && this.XPosition.Equals(b.XPosition) && this.YPosition.Equals(b.YPosition)); }