示例#1
0
        public override bool Equals(System.Object obj)
        {
            XmlChangeBrightnessBrick b = obj as XmlChangeBrightnessBrick;

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

            return(this.Equals(b) && this.ChangeBrightness.Equals(b.ChangeBrightness));
        }
        public void XmlChangeBrightnessBrickTest()
        {
            TextReader sr = new StringReader("<brick type=\"ChangeBrightnessByNBrick\"><formulaList><formula category=\"CHANGE_BRIGHTNESS\"><type>NUMBER</type><value>25</value></formula></formulaList></brick>");
            var xRoot = XElement.Load(sr);

            var testObject = new XmlChangeBrightnessBrick(xRoot);

            var referenceObject = new XmlChangeBrightnessBrick()
            {
                ChangeBrightness = new XmlFormula(xRoot, XmlConstants.ChangeBrightness),
            };

            Assert.AreEqual(referenceObject, testObject);
        }
 public bool Equals(XmlChangeBrightnessBrick b)        {
     return this.Equals((XmlBrick)b) && this.ChangeBrightness.Equals(b.ChangeBrightness);
 }
示例#4
0
 public bool Equals(XmlChangeBrightnessBrick b)
 {
     return(this.Equals((XmlBrick)b) && this.ChangeBrightness.Equals(b.ChangeBrightness));
 }