Exemple #1
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         MockSerBean other = (MockSerBean)obj;
         return(JodaBeanUtils.equal(BdConvention, other.BdConvention) && JodaBeanUtils.equal(HolidayCalendar, other.HolidayCalendar) && JodaBeanUtils.equal(DayCount, other.DayCount) && JodaBeanUtils.equal(Objects, other.Objects));
     }
     return(false);
 }
        internal virtual void serialize(HolidayCalendar holCal)
        {
            MockSerBean bean = new MockSerBean();

            bean.BdConvention    = BusinessDayConventions.MODIFIED_FOLLOWING;
            bean.HolidayCalendar = holCal;
            bean.DayCount        = DayCounts.ACT_360;
            bean.Objects         = ImmutableList.of(BusinessDayConventions.MODIFIED_FOLLOWING, holCal, DayCounts.ACT_360);

            string      xml  = JodaBeanSer.PRETTY.xmlWriter().write(bean);
            MockSerBean test = JodaBeanSer.COMPACT.xmlReader().read(xml, typeof(MockSerBean));

            assertEquals(test, bean);
        }