Exemple #1
0
        public override bool IsValid(params ILegalPerson[] persons)
        {
            var offeror = persons.FirstOrDefault();
            var offeree = persons.Skip(1).Take(1).FirstOrDefault();

            if (!(offeror is UnitedStatesLifeInsCo) || !(offeree is Wilson))
            {
                AddReasonEntry("incorrect person given");
                return(false);
            }

            //policy is such that you add the grace period to the due date then from
            //that add the 31 days and up to that you get reinstated without written approval
            var duePlusGrace      = DueDate.Add(ExtendedGracePeriod);
            var duePlusGraceAnd31 = duePlusGrace.Add(WrittenApprovalNotRequired);
            var r = duePlusGraceAnd31 > DateOfPayment;

            if (!r)
            {
                AddReasonEntry($"due date plus extended grace period {duePlusGrace.ToShortDateString()}");
                AddReasonEntry($"the additional 31 days before written notice { duePlusGraceAnd31.ToShortDateString()}");
            }

            return(r);
        }