Beispiel #1
0
        public override bool Equals(System.Object obj)
        {
            XmlPointInDirectionBrick b = obj as XmlPointInDirectionBrick;

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

            return(this.Equals(b) && this.Degrees.Equals(b.Degrees));
        }
        public void XmlPointInDirectionBrickTest()
        {
            TextReader sr = new StringReader("<brick type=\"PointInDirectionBrick\"> <formulaList> <formula category=\"DEGREES\"> <type>USER_VARIABLE</type> <value>Airplane&apos;s direction</value> </formula> </formulaList> </brick>");
            var xRoot = XElement.Load(sr);

            var testObject = new XmlPointInDirectionBrick(xRoot);

            var referenceObject = new XmlPointInDirectionBrick()
            {
                Degrees = new XmlFormula(xRoot, XmlConstants.Degrees),
            };

            Assert.AreEqual(referenceObject, testObject);
        }
Beispiel #3
0
 public bool Equals(XmlPointInDirectionBrick b)
 {
     return(this.Equals((XmlBrick)b) && this.Degrees.Equals(b.Degrees));
 }
 public bool Equals(XmlPointInDirectionBrick b)
 {
     return this.Equals((XmlBrick)b) && this.Degrees.Equals(b.Degrees);
 }