Ejemplo n.º 1
0
        public void TestYearMonthInterval()
        {
            IPofReader           pofReader = initPofReader("YearMonthInterval");
            RawYearMonthInterval ymi       = new RawYearMonthInterval(4, 7);
            RawYearMonthInterval res       = pofReader.ReadRawYearMonthInterval(0);

            Assert.AreEqual(ymi.Years, res.Years);
            Assert.AreEqual(ymi.Months, res.Months);
        }
        /// <summary>
        /// Compare this object with another for equality.
        /// </summary>
        /// <param name="o">
        /// Another object to compare to for equality.
        /// </param>
        /// <returns>
        /// <b>true</b> iff this object is equal to the other object.
        /// </returns>
        public override bool Equals(object o)
        {
            if (o is RawYearMonthInterval)
            {
                RawYearMonthInterval that = (RawYearMonthInterval)o;
                return(Years == that.Years && Months == that.Months);
            }

            return(false);
        }